Modify ↓
Ticket #9122 (closed bug: invalid)
attr() returns "undefined" for rowspan and colspan for cells where they aren't explicitly set
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | attributes | Version: | 1.6 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
For all browsers besides Internet Explorer I tested, jQuery 1.6 will return undefined when getting colspan or rowspan for a td where it isn't explicitely set. In Internet Explorer browsers the return value is 1, which is the way it used to be in all browsers prior to jQuery 1.6.
Tested browsers were Firefox versions 3.6 and 4.0, Opera 11, Chrome 11, IE 6, 7 and 8.
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.

This is the expected behavior as of jQuery 1.6, which removes the ambiguity between attributes and properties. If the attribute has not been set, attr will return undefined, but prop will return the corresponding property. The docs have been updated and please check out the new prop method.