-
Notifications
You must be signed in to change notification settings - Fork 260
Expand file tree
/
Copy pathattribute-not-equal-selector.xml
More file actions
41 lines (35 loc) · 1.57 KB
/
attribute-not-equal-selector.xml
File metadata and controls
41 lines (35 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<entry type='selector' name="attributeNotEqual" return="" >
<sample>[attribute!="value"]</sample>
<signature><added>1.0</added>
<argument name="attribute" type="String">
<desc>An attribute name.</desc>
</argument>
<argument name="value" type="String">
<desc>An attribute value. Can be either an unquoted single word or a quoted string.</desc>
</argument></signature>
<desc>Select elements that either don't have the specified attribute, or do have the specified attribute but not with a certain value.</desc>
<longdesc><p>This selector is equivalent to <code>:not([attr="value"])</code>.</p> </longdesc>
<note id="jquery-selector-extension-alt" type="additional">
<placeholder name="selector">[name!="value"]</placeholder>
<placeholder name="alt">$("your-pure-css-selector").not('[name="value"]')</placeholder>
</note>
<example>
<desc>Finds all inputs that don't have the name 'newsletter' and appends text to the span next to it.</desc>
<code><![CDATA[$('input[name!="newsletter"]').next().append('<b>; not newsletter</b>');]]></code>
<html><![CDATA[<div>
<input type="radio" name="newsletter" value="Hot Fuzz" />
<span>name is newsletter</span>
</div>
<div>
<input type="radio" value="Cold Fusion" />
<span>no name</span>
</div>
<div>
<input type="radio" name="accept" value="Evil Plans" />
<span>name is accept</span>
</div>]]></html>
</example>
<category name="Attribute" slug="attribute-selectors"/>
<category name="jQuery Extensions" slug="jquery-selector-extensions"/>
<category name="Version 1.0" slug="1.0"/>
</entry>