LoneSpruce Posted January 9 Posted January 9 I'm looking to use an accordion block as a menu on my homepage. However, I only want certain sections to expand, while using just the title of the other sections — what I'm looking to do is create a hyperlink for those non-expandable section titles so they connect to pages on the site. This is a rough example: https://toddmartinfilms.com
forgooddigital Posted March 4 Posted March 4 I am also trying to do this. I've disabled the accordion description so only titles show, and I want to turn the title into a clickable link. Is this possible? @tuanphan you might know! You're ace at this stuff.
tuanphan Posted March 5 Posted March 5 On 3/4/2024 at 2:10 PM, forgooddigital said: I am also trying to do this. I've disabled the accordion description so only titles show, and I want to turn the title into a clickable link. Is this possible? @tuanphan you might know! You're ace at this stuff. First, change accordion item, from this your current title accordion to this <a href="https://google.com">your current title accordion</a> Next, add this code to Website > Website Tools > Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("span.accordion-item__title").each(function(){ $(this).html($(this).text()); }); }); </script> abc 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!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment