开发者

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

开发者 https://www.devze.com 2023-01-15 05:56 出处:网络
I have several tex开发者_如何学Ctareas like: <asp:textbox class=\"input ThisIsRussia\" ..... />

I have several tex开发者_如何学Ctareas 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?


$('textarea').not('.ThisIsSparta');
0

精彩评论

暂无评论...
验证码 换一张
取 消