Side navigation
#4459 closed bug (fixed)
Opened March 31, 2009 01:18PM UTC
Closed May 10, 2009 04:09PM UTC
$.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.
It certainly doesn't look like $.map handles arbitrary objects. It could handle array-like objects though; maybe that's what the docs meant?