Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Html ID of header menu item


MetaIT

Question

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 post
  • Answers 14
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Popular Posts

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!

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.

Posted Images

14 answers to this question

Recommended Posts

  • 0

image.thumb.png.90471a1da5c18e8f9a3fcb7d99685c6f.png

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 post
  • 0
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 post
  • 0

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');
});

 

Edited by rwp
Link to post
  • 0
Posted (edited)
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!

Edited by MetaIT

Freelancer - Project Manager digital solutions. Recently started to explore Squarespace. My site (not Squarespace): https://metait.no/

Link to post
  • 0
Posted (edited)
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? 

Edited by MetaIT

Freelancer - Project Manager digital solutions. Recently started to explore Squarespace. My site (not Squarespace): https://metait.no/

Link to post
  • 0
$(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 post
  • 0
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 post
  • 0
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 post
  • 0
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 post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...