dcolumbus
dcolumbus

Reputation: 9714

jQuery: find element with an href of X

I need to be able to check the following:

$(".main-menu a")

For a specific href attribute and then addClass

Upvotes: 0

Views: 5511

Answers (1)

adeneo
adeneo

Reputation: 318372

$(".main-menu a[href='http://somesite.com']").addClass('someClass');

Upvotes: 6

Related Questions