rrrrrrrrr Posted May 18, 2022 Posted May 18, 2022 Site URL: https://rthglmr.squarespace.com Password: rthglmr! Hello, I have managed to come quite far in my website with learning CSS but now I am SUUUUPER stuck. I am trying to have the same navigation on my desktop and mobile site. The desktop is working exactly how I wish it to and now I need the folders to be clickable onto a page on the mobile view. I would like to avoid the drop-down text menu and instead link to a page that is more visual. I would really appreciate any wisdom or insight on this!
rrrrrrrrr Posted May 18, 2022 Author Posted May 18, 2022 I have tried many different codes, the most recent being this one by @tuanphan but cannot find any success <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function() { $('button.Mobile-overlay-nav-item.Mobile-overlay-nav-item--folder:nth-child(2)').click(function() { window.location = "/portfolio"; }); }); </script>
tuanphan Posted May 20, 2022 Posted May 20, 2022 On 5/18/2022 at 7:12 PM, rrrrrrrrr said: I have tried many different codes, the most recent being this one by @tuanphan but cannot find any success <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function() { $('button.Mobile-overlay-nav-item.Mobile-overlay-nav-item--folder:nth-child(2)').click(function() { window.location = "/portfolio"; }); }); </script> I see mobile works here? It looks like you solved with this code <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $('.header-nav-folder-title[href="/portfolio_"], [data-folder-id="/portfolio_"]').click(function() { window.location = "https://rthglmr.squarespace.com/portfolio"; }); $('.header-nav-folder-title[href="/publications_"], [data-folder-id="/publications_"]').click(function() { window.location = "https://rthglmr.squarespace.com/publications"; }); $('.header-nav-folder-title[href="/text_"], [data-folder-id="/text_"]').click(function() { window.location = "https://rthglmr.squarespace.com/text"; }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment