Skip to main content

Bug Tracker

Side navigation

#9734 closed bug (invalid)

Opened July 03, 2011 06:49PM UTC

Closed July 12, 2011 06:26PM UTC

Last modified July 12, 2011 06:26PM UTC

":enabled" works in Firefox but not in IE7

Reported by: sunnyramon@hotmail.com Owned by:
Priority: high Milestone: 1.next
Component: selector Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:
Description

In IE7, the whole body background changed the color.

<html>
<head>
<script type="text/javascript" src="jquery-1.6.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $(":enabled").css("background-color","red");
});
</script>
</head>
<body>

<form action="">
Name: <input type="text" name="user" />
<br />
ID:<input type="text" name="id" disabled="disabled" />
Age:
<select disabled="disabled">
<option>20-30</option>
<option>30-50</option>
<option>50+</option>
</select>
<input type="submit" />
</form>

</body>
</html>

Attachments (0)
Change History (4)

Changed July 03, 2011 06:57PM UTC by timmywil comment:1

component: unfiledsupport
priority: undecidedhigh
status: newopen

Confirmed, but in the meantime I suggest using a tagName with filters, such as

$('input:enabled, select:enabled')

This is more performant and has the advantage of not affecting elements that do not have a disabled property.

Changed July 03, 2011 06:59PM UTC by timmywil comment:2

Changed July 12, 2011 06:26PM UTC by john comment:3

resolution: → invalid
status: openclosed

I agree with timmywil, you should really limit this to just the specific elements that you want highlighted.

Changed July 12, 2011 06:26PM UTC by john comment:4

component: supportselector