Bug Tracker

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:


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)

map_test_case.js (356 bytes) - added by gero_ 14 years ago.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by gero_

Attachment: map_test_case.js added

comment:1 Changed 14 years ago by dmethvin

It certainly doesn't look like $.map handles arbitrary objects. It could handle array-like objects though; maybe that's what the docs meant?

comment:2 Changed 14 years ago by dmethvin

Resolution: fixed
Status: newclosed

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.