cami_leisk Posted November 27, 2023 Share Posted November 27, 2023 I recently saw a post from years ago for a custom code option for a 7.0 site with the avenue theme. That particular forum post is archived and not able to take on any more comments, so I'm hoping there's someone who could help me with the same thing - My client's site is https://www.jackmauch.com and it is live. I would like to make the drop down folder called work ("/work") link to an unlinked page called Portfolio Overview ("/portfolio-overview") Then I would like to make the dropdown folder called Digital Processes ("digital-processes-folder") link to the page called Consulting ("digital-processes") I realize these are two different things but if I could just get help with the first thing I will be so grateful. I have tried the two codes below with no luck. I removed each after it was clear they weren't working. Method 1: Code injection header: <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> code injection footer: <script> $(function() { $(".Header-nav-folder-title[href='/work']").attr('href', '/portfolio-overview'); }); </script> Method 2: Code injection header: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function() { $('.Header-nav-folder-title[href="/work"]').attr("href", "/portfolio-overview"); }); </script> Please let me know if you might be able to help me! - Cami Link to comment
Solution tuanphan Posted November 29, 2023 Solution Share Posted November 29, 2023 You can use this code <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(document).ready(function() { $("nav.main-nav>ul>li:nth-child(1)>a").click(function() { var link = $(this).text(), href = "/portfolio-overview"; window.location.href=href; }); }); </script> cami_leisk 1 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!) Link to comment
cami_leisk Posted November 30, 2023 Author Share Posted November 30, 2023 Thank you this worked great! 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