Skip to main content

Bug Tracker

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.

Attachments (1)
Change History (2)

Changed April 01, 2009 03:30AM UTC by dmethvin comment:1

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

Changed May 10, 2009 04:09PM UTC by dmethvin comment:2

resolution: → fixed
status: newclosed

I'm going to assume it meant array-like objects, so I've updated the documentation to make this clear.