":enabled" works in Firefox but not in IE7
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>
Change History (4)
Component: |
unfiled →
support
|
Priority: |
undecided →
high
|
Status: |
new →
open
|
Resolution: |
→ invalid
|
Status: |
open →
closed
|
Component: |
support →
selector
|
Confirmed, but in the meantime I suggest using a tagName with filters, such as
This is more performant and has the advantage of not affecting elements that do not have a disabled property.