sb9201 Posted August 2 Share Posted August 2 roseandcodesign.ca Here is the code I've added to my custom css section: /*adds logo over homepage slideshow*/ #collection-66abca86f4a970287d00bdb6:before { content: ""; background-image: url(https://images.squarespace-cdn.com/content/6320953b85446233a75238cd/b46a4d10-2b29-4176-81df-7b605f7d6917/Asset+2.png?content-type=image%2Fpng); background-repeat: no-repeat; background-size: contain; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 9999; width: 100px; height: 100px; } How can I make it so that clicking on my logo has the same result as clicking on the hamburger icon? Link to comment
HoaLT Posted August 2 Share Posted August 2 1 hour ago, sb9201 said: roseandcodesign.ca Here is the code I've added to my custom css section: /*adds logo over homepage slideshow*/ #collection-66abca86f4a970287d00bdb6:before { content: ""; background-image: url(https://images.squarespace-cdn.com/content/6320953b85446233a75238cd/b46a4d10-2b29-4176-81df-7b605f7d6917/Asset+2.png?content-type=image%2Fpng); background-repeat: no-repeat; background-size: contain; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 9999; width: 100px; height: 100px; } How can I make it so that clicking on my logo has the same result as clicking on the hamburger icon? I think we need to implement js code to handle the action clicking your custom logo? Or may be another forum member can share other interesting ideas Press 👍 or mark my comment as solution if you find my sharing useful 🆒 Squarespace pinchzoom lightbox plugin (affiliate link) 👁🗨 360 degree photo viewer (affiliate link) Link to comment
sb9201 Posted August 2 Author Share Posted August 2 1 minute ago, HoaLT said: I think we need to implement js code to handle the action clicking your custom logo? Or may be another forum member can share other interesting ideas I'm really not sure. Hopefully someone is able to help! Link to comment
sb9201 Posted August 2 Author Share Posted August 2 Happy to send $ via PayPal for the help! Link to comment
Solution creedon Posted August 2 Solution Share Posted August 2 This is not a full solution but it should take care of the click part of the issue. Add the following to Page Settings > Advanced > Page Header Code Injection for the home page. Please see per-page code injection. <script> /* Version : 0.1.0 SS Version : 7.1 v7.1 Fluid Engine Compatible : Yes Copyright : 2024 Thomas Creedon Tom's Web Consulting < http://www.tomsWeb.consulting/ > */ const callback = ( ) => { const callback = ( ) => { const selector = '.burger'; document .querySelector ( selector ) .click ( ); }; const selector = '#page'; document .querySelector ( selector ) .addEventListener ( 'click', callback ); }; addEventListener ( 'DOMContentLoaded', callback ); </script> Also a minor change to the CSS. .homepage #page::before { background-image : url( https://images.squarespace-cdn.com/content/6320953b85446233a75238cd/b46a4d10-2b29-4176-81df-7b605f7d6917/Asset+2.png ); background-repeat : no-repeat; background-size : contain; content : ''; cursor : pointer; height : 100px; left : 50%; position : fixed; top : 50%; transform : translate( -50%, -50% ); width : 100px; z-index : 99; } Let us know how it goes. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
sb9201 Posted August 5 Author Share Posted August 5 On 8/2/2024 at 7:16 PM, creedon said: This is not a full solution but it should take care of the click part of the issue. Add the following to Page Settings > Advanced > Page Header Code Injection for the home page. Please see per-page code injection. <script> /* Version : 0.1.0 SS Version : 7.1 v7.1 Fluid Engine Compatible : Yes Copyright : 2024 Thomas Creedon Tom's Web Consulting < http://www.tomsWeb.consulting/ > */ const callback = ( ) => { const callback = ( ) => { const selector = '.burger'; document .querySelector ( selector ) .click ( ); }; const selector = '#page'; document .querySelector ( selector ) .addEventListener ( 'click', callback ); }; addEventListener ( 'DOMContentLoaded', callback ); </script> Also a minor change to the CSS. .homepage #page::before { background-image : url( https://images.squarespace-cdn.com/content/6320953b85446233a75238cd/b46a4d10-2b29-4176-81df-7b605f7d6917/Asset+2.png ); background-repeat : no-repeat; background-size : contain; content : ''; cursor : pointer; height : 100px; left : 50%; position : fixed; top : 50%; transform : translate( -50%, -50% ); width : 100px; z-index : 99; } Let us know how it goes. It worked!!!!!! THANK YOU so much. Do you know how to fix my last menu issue by any chance? https://forum.squarespace.com/topic/318055-how-can-i-add-my-site-footer-to-my-mobile-menu/ Also, do you have somewhere I can send you a tip as a thank you like buymeacoffee or paypal? creedon 1 Link to comment
creedon Posted August 5 Share Posted August 5 7 hours ago, sb9201 said: Do you know how to fix my last menu issue by any chance? Unfortunately, I do not. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment