Sam999 Posted May 9 Share Posted May 9 (edited) I am attempting to make the folder title WHATS ON in my website clickable by inserting a link to the VIEW ALL EVENTS page shown in the WHATS ON drop down menu. I have injected the code below into the website but the what's on title is still not clickable. Header <script src=https://code.jquery.com/jquery-3.6.0.min.js></script> Footer <script> $(".header-nav-folder-title[href='/WHATS-ON']").click(function() { window.location.href = "/live-events"; }); </script> URL is www.gloucesterguildhall.co.uk. This website uses 7.0. Is anyone able to advise regarding if this is the correct code to use? Edited May 11 by Sam999 Link to comment
tuanphan Posted May 11 Share Posted May 11 What is your site url? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Sam999 Posted May 11 Author Share Posted May 11 2 hours ago, tuanphan said: What is your site url? www.gloucesterguildhall.co.uk Link to comment
ltaborsky Posted May 11 Share Posted May 11 I would also like to know how to make a folder link to a page. www,hydrometrics.com Thank you. Link to comment
tuanphan Posted May 14 Share Posted May 14 Add to Settings > Advanced > Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script> <script> $(document).ready(function() { $("nav.main-nav>ul>li:nth-child(2)>a").click(function() { var link = $(this).text(), href = "/live-events"; window.location.href=href; }); }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Sam999 Posted May 14 Author Share Posted May 14 13 hours ago, tuanphan said: Add to Settings > Advanced > Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script> <script> $(document).ready(function() { $("nav.main-nav>ul>li:nth-child(2)>a").click(function() { var link = $(this).text(), href = "/live-events"; window.location.href=href; }); }); </script> Thank you. Can you advise if it would be the same code block that I would use if I wanted to also add a link to another folder title on the website? I would like to also add a link to the folder title HIRE US with an unlisted page that has the URL slug /HIRES. Link to comment
tuanphan Posted May 19 Share Posted May 19 On 5/15/2023 at 2:31 AM, Sam999 said: Thank you. Can you advise if it would be the same code block that I would use if I wanted to also add a link to another folder title on the website? I would like to also add a link to the folder title HIRE US with an unlisted page that has the URL slug /HIRES. Can you add Hire Us folder first? We can check code easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Sam999 Posted May 19 Author Share Posted May 19 2 hours ago, tuanphan said: Can you add Hire Us folder first? We can check code easier This is the hire us folder. Link to comment
Solution tuanphan Posted May 22 Solution Share Posted May 22 On 5/15/2023 at 2:31 AM, Sam999 said: Thank you. Can you advise if it would be the same code block that I would use if I wanted to also add a link to another folder title on the website? I would like to also add a link to the folder title HIRE US with an unlisted page that has the URL slug /HIRES. Use this new code <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script> <script> $(document).ready(function() { $("nav.main-nav>ul>li:nth-child(2)>a").click(function() { var link = $(this).text(), href = "/live-events"; window.location.href=href; }); $("nav.main-nav>ul>li:nth-child(3)>a").click(function() { var link = $(this).text(), href = "/corporate-hire"; window.location.href=href; }); }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
tuanphan Posted May 22 Share Posted May 22 On 5/12/2023 at 12:26 AM, ltaborsky said: I would also like to know how to make a folder link to a page. www,hydrometrics.com Thank you. Sorry, I didn't see your comment. Add this to Settings > Advanced > Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script> <script> $(document).ready(function() { $('a.header-nav-folder-title[href="/whatwedo"]').click(function() { var link = $(this).text(), href = "https://google.com"; window.location.href=href; }); }); </script> Replace google with new url Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care 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