I have a simple accordion menu (5 menu items in total), where only the second menu Item has a sub menu. So I need a way to target the first, third, fourth and fifth menu items to make them work direct links going straight to another page.
Where because of $( “dt a:not( :first )” ).click(function(){ the first menu item is reacting as a normal link, but I have no Idea how to target the third, forth and fifth as well. Please advise
I don’t get any errors but it isn’t working either. I not even know if third is valid to use. I’ve been searchin on Google but couldn’t find anything back. Please advise where to look for?
It looks like the accordion stuff is in your click listener, and you’re trying to only apply it to the second link. Is that correct? If so, you only need to use the eq function to do what you want:
$('dt a').eq(1).click(function () {
/* do accordion stuff here */
});