Opened 14 years ago
Closed 14 years ago
#4459 closed bug (fixed)
$.map doesn't iterate through objects
Reported by: | gero_ | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | unfiled | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Though the docs expicitly say $.map iterates through objects (http://docs.jquery.com/Utilities/jQuery.map#arraycallback "Map can also iterate through objects as well."), it is not working. A simple test case is attached. Tested in Firefox 3 and Safari 3 on OSX, Firefox 3 on Windows. The callback for the object just doesn't run. I don't know if it's a mistake in the documentation or a bug.
Attachments (1)
Change History (3)
Changed 14 years ago by
Attachment: | map_test_case.js added |
---|
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I'm going to assume it meant array-like objects, so I've updated the documentation to make this clear.
Note: See
TracTickets for help on using
tickets.
It certainly doesn't look like $.map handles arbitrary objects. It could handle array-like objects though; maybe that's what the docs meant?