Opened 10 years ago
Closed 10 years ago
#13046 closed bug (notabug)
Attribute Not Equal Selector does not work properly
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Attribute Not Equal Selector does not work if element selector is not set explicitly. Fo the next sample color is set for all elements:
<div id="a">a</div> <span id="b">b</span> <a id="c" href="#">c</div> <script type="text/javascript"> $(function(){ $('[id!="a"]').css('color', 'red'); }) </script>
Change History (2)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
You're setting the color on ALL elements, including the body, which is where a
inherits its color from.
Note: See
TracTickets for help on using
tickets.
Demo at jsFiddle: http://jsfiddle.net/Cardinale/bEQZp/