Link to home
Start Free TrialLog in
Avatar of hankknight
hankknightFlag for Canada

asked on

jQuery: Select element where class NOT xyz

How can I select an element using find() only if the class is NOT xyz?
$('.featured>span').find('a  CLASS NOT .xyz ').click(function() { alert(123) });

Open in new window

Avatar of chaitu chaitu
chaitu chaitu
Flag of India image

$('.featured > span').not('.xyz ').click(function() { alert(123) });

ASKER CERTIFIED SOLUTION
Avatar of chaitu chaitu
chaitu chaitu
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial