Bug Tracker

Opened 8 years ago

Closed 8 years ago

#13046 closed bug (notabug)

Attribute Not Equal Selector does not work properly

Reported by: Alex Tokar <alex.tokar@…> 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 8 years ago by Alex Tokar <alex.tokar@…>

comment:2 Changed 8 years ago by dmethvin

Resolution: notabug
Status: newclosed

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.