Ticket #11598 (closed bug: wontfix)
$('li').removeAttr('value');//IE Error
| Reported by: | anonymous | Owned by: | anonymous |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | attributes | Version: | 1.7.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
eg.: <li value='1'>abc</li> $('li').removeAttr('value');IE Error
Change History
comment:1 Changed 13 months ago by sindresorhus
- Owner set to anonymous
- Status changed from new to pending
comment:2 Changed 13 months ago by addyosmani
- Priority changed from undecided to low
- Resolution set to wontfix
- Status changed from pending to closed
- Component changed from unfiled to attributes
Please note that use of the value attribute on <li> elements has been deprecated for quite some time (HTML 4.01) http://www.w3.org/TR/1999/REC-html401-19991224/struct/lists.html#h-10.2.
In my opinion, rather than trying to fix this issue, I recommend the OP use data attributes for storing values instead as these are more flexible. $(el).removeAttr() appears to work fine for other cases where value is still semantically valid.
(If anyone strongly disagrees with this, please feel free to reopen) :)
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.