jquery - First element not with class -


i want select first element not have class .disabled.

i tried these without success:

$('.selected:first:not(".disabled")').addclass('first'); 

and

$('.selected:first').not(".disabled").addclass('first'); 

you have element class 'selected' without class 'disabled' first of them.

$('.selected:not(.disabled)').first().addclass('disabled'); 

or

$('.selected:not(.disabled):first').addclass('disabled'); 

fiddle: http://jsfiddle.net/5luxd/1/


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -