Skip to main content

Bug Tracker

Side navigation

#14914 closed bug (notabug)

Opened March 25, 2014 06:43AM UTC

Closed March 25, 2014 12:48PM UTC

jQuery.indexOf fails where Array.prototype.indexOf works

Reported by: Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.11.0
Keywords: Cc:
Blocked by: Blocking:

If you add an element to an array, and then use the jQuery.appendTo method to attach that element to another DOM node, jQuery.inArray will return -1 for that element.

jsFiddle link:

Attachments (0)
Change History (1)

Changed March 25, 2014 12:48PM UTC by dmethvin comment:1

resolution: → notabug
status: newclosed

You have the arguments backwards.

Please read the docs and sanity check code on StackOverflow or the jQuery forum before creating bug reports.