Link to home
Create AccountLog in
Avatar of hankknight
hankknightFlag for Canada

asked on

jQuery: Combine Not into First Element Selector

How can this be combined so that the "not" is combined with the first element selector?

$('a[href]').not('[href^="http"],[href^="mailto:"],[href^="/"],[href^="."],[href^="#"]').each(function(ev) { });

Open in new window

This does not work:

$('a[href]:not([href^="http"],[href^="mailto:"],[href^="/"],[href^="."],[href^="#"])').each(function(ev) {});

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of mickey159
mickey159
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account