views:

38

answers:

1

Hi, 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?

+3  A: 
$('textarea').not('.ThisIsSparta');
Serkan
Hi, i was wrong, this is actually not working...
iamserious
$('textarea[class=ThisIsSparta]') resolves all textarea-elements that have exactly ThisIsSparta in their class attribute, input's with class 'input ThisIsSparta' will not be resolved. However $('textarea.ThisIsSparta') works like selecting a CSS element. If that class exists for the element it is selected. Another possibility is to use: $('textarea:not(.ThisIsSparta)').
Serkan
Hi, yea, i think I understand now.. I realized that it was not working because of a small mistake i did.. thanks, its all fine now :)
iamserious