Domanda

I need to be able to check the following:

$(".main-menu a")

For a specific href attribute and then addClass

È stato utile?

Soluzione

$(".main-menu a[href='http://somesite.com']").addClass('someClass');
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top