MetaIT Posted August 6, 2020 Share Posted August 6, 2020 Site URL: https://wedge-tangerine-ac3a.squarespace.com/ I need to find the html id of the menu item called "deltakere2". This is for creating a popup when clicking on that menu item. I would appreciate any help with this. Pass of the site: 1qaz2wsx Regards, Taulant Freelancer - Project Manager digital solutions. Recently started to explore Squarespace. My site (not Squarespace): https://metait.no/ Link to comment
tuanphan Posted August 6, 2020 Share Posted August 6, 2020 nav.header-nav-list>div:nth-child(3) a Hjem: nth-child(1) Deltakere: nth-child(2) Deltakere2: nth-child(3) Aktuelt: nth-child(4) 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
MetaIT Posted August 6, 2020 Author Share Posted August 6, 2020 4 minutes ago, tuanphan said: nav.header-nav-list>div:nth-child(3) a That is not a html id, but css id? I am using Elfsight Apps to create an embedded popup. There I need the html element id for setting the on click trigger. Freelancer - Project Manager digital solutions. Recently started to explore Squarespace. My site (not Squarespace): https://metait.no/ Link to comment
rwp Posted August 6, 2020 Share Posted August 6, 2020 That link doesn't have an html id. Link to comment
MetaIT Posted August 6, 2020 Author Share Posted August 6, 2020 3 hours ago, rwp said: That link doesn't have an html id. That is correct, but is there a way to acheive this with the header menu? Freelancer - Project Manager digital solutions. Recently started to explore Squarespace. My site (not Squarespace): https://metait.no/ Link to comment
rwp Posted August 6, 2020 Share Posted August 6, 2020 We can give it an ID with jQuery. You have a business or commerce account, correct? $(document).ready( function() { $('nav.header-nav-list>div:nth-child(3) a').attr('id', 'Deltakere2'); }); Link to comment
MetaIT Posted August 7, 2020 Author Share Posted August 7, 2020 12 hours ago, rwp said: We can give it an ID with jQuery. You have a business or commerce account, correct? $(document).ready( function() { $('nav.header-nav-list>div:nth-child(3) a').attr('id', 'Deltakere2'); }); That is a great idea, and it worked! Thank you sir! Freelancer - Project Manager digital solutions. Recently started to explore Squarespace. My site (not Squarespace): https://metait.no/ Link to comment
MetaIT Posted August 7, 2020 Author Share Posted August 7, 2020 2 hours ago, MetaIT said: That is a great idea, and it worked! Thank you sir! There is a problem tho... Mobile menu, dosent work 😕 I belive that is because of the id "nav.header-nav-list" is different there. Should I create a new script for this, if so, can you help me out with the content? Freelancer - Project Manager digital solutions. Recently started to explore Squarespace. My site (not Squarespace): https://metait.no/ Link to comment
rwp Posted August 7, 2020 Share Posted August 7, 2020 $(document).ready( function() { $('nav.header-nav-list > div:nth-child(2) a').attr('id', 'Deltakere2'); $('.header-menu-nav-folder-content > div:nth-child(2) a').attr('id', 'Deltakere2'); }); Update the code to this. Link to comment
MetaIT Posted August 7, 2020 Author Share Posted August 7, 2020 1 hour ago, rwp said: $(document).ready( function() { $('nav.header-nav-list > div:nth-child(2) a').attr('id', 'Deltakere2'); $('.header-menu-nav-folder-content > div:nth-child(2) a').attr('id', 'Deltakere2'); }); Update the code to this. Sorry, no magic there 😕 Freelancer - Project Manager digital solutions. Recently started to explore Squarespace. My site (not Squarespace): https://metait.no/ Link to comment
rwp Posted August 7, 2020 Share Posted August 7, 2020 It worked, its live on your page now. Link to comment
MetaIT Posted August 7, 2020 Author Share Posted August 7, 2020 1 hour ago, rwp said: It worked, its live on your page now. It seems to have gotten the id. But cant get the popup to work? Like on the desktop. Freelancer - Project Manager digital solutions. Recently started to explore Squarespace. My site (not Squarespace): https://metait.no/ Link to comment
rwp Posted August 7, 2020 Share Posted August 7, 2020 Unfortunately, I don't know anything about that plugin. Link to comment
MetaIT Posted August 7, 2020 Author Share Posted August 7, 2020 25 minutes ago, rwp said: Unfortunately, I don't know anything about that plugin. Hey got it to work! Gave the mobile menu item another id and created a new popup module assigned to that id. You have been so helpful man, thank you, it is much appreciated! Wish you the best. Freelancer - Project Manager digital solutions. Recently started to explore Squarespace. My site (not Squarespace): https://metait.no/ Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.