Pergunta

I need to be able to check the following:

$(".main-menu a")

For a specific href attribute and then addClass

Foi útil?

Solução

$(".main-menu a[href='http://somesite.com']").addClass('someClass');
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top