Modify ↓
Ticket #9612 (closed bug: duplicate)
$.attr('defaultSelected') returns undefined instead of true/false
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | attributes | Version: | 1.6.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
$('option').attr('defaultSelected') should return true or false for <option> elements. The attribute appears in the DOM but jQuery returns undefined.
This might have something to do with that attribute being read-only?
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Thanks for taking the time to contribute to the jQuery project! This is a case where prop should be used instead since defaultSelected is not an attribute.