Link to home
Start Free TrialLog 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
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial