Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

select all textarea which does NOT have a certain class in Jquery

I have several textareas like:

<asp:textbox class="input ThisIsRussia" ..... />
<asp:textbox class="input" ..... />
<asp:textbox class="input ThisIsSparta" ..... />
<asp:textbox class="input" ..... />

Now, I have to select all the textarea / textbox which does not have the class "ThisIsSparta", how do I do it?

I was checking the Jquery selectors website and it said I have to uses

[name!=value]

for this purpose, but when I did this:

$('textarea[class!=ThisIsSparta]').SlideUp();

it was affecting my spartan textarea too! Am I missing something?

like image 963
iamserious Avatar asked Sep 09 '10 14:09

iamserious


1 Answers

$('textarea').not('.ThisIsSparta');
like image 141
Serkan Avatar answered Jan 03 '23 07:01

Serkan