Saturday 15 September 2012

javascript - Select div not with classe -



javascript - Select div not with classe -

this question has reply here:

jquery if div doesn't have class “x” 7 answers

i have lot of divs on site.

<div class="slide bx-clone"></div> <div class="slide"></div> <div class="slide"></div> <div class="slide bx-clone"></div> <div class="slide bx-clone"></div> <div class="slide bx-clone"></div>

now want select div jquery. want divs classe slide. , not divs classe slide bx-clone.

how can create select statement?

this should trick:

$('.slide:not(.bx-clone)');

that's jquery's not selector.

or, filter elements afterwards, using .not():

$('.slide').not('.bx-clone');

javascript jquery html

No comments:

Post a Comment