Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (38 sloc) 1.658 kB
<?xml version="1.0"?>
<entry type="selector" name="attributeNotEqual" return="">
<title>Attribute Not Equal Selector [name!="value"]</title>
<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" data-selector="[name!=&quot;value&quot;]" data-alt="$(&quot;your-pure-css-selector&quot;).not('[name=&quot;value&quot;]')"/>
<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 slug="selectors/attribute-selectors"/>
<category slug="selectors/jquery-selector-extensions"/>
<category slug="version/1.0"/>
</entry>
Jump to Line
Something went wrong with that request. Please try again.