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: | agnijith@gmail.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.11.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
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: http://jsfiddle.net/zVsr5
Attachments (0)
Change History (1)
Changed March 25, 2014 12:48PM UTC by comment:1
resolution: | → notabug |
---|---|
status: | new → closed |
You have the arguments backwards. http://jsfiddle.net/zVsr5/2/ https://api.jquery.com/jQuery.inArray/
Please read the docs and sanity check code on StackOverflow or the jQuery forum before creating bug reports.