Skip to main content

Bug Tracker

Side navigation

#7549 closed bug (invalid)

Opened November 18, 2010 08:01AM UTC

Closed November 18, 2010 09:28AM UTC

jQuery can not insert a stack of elements with after, insertAfter, before and insertBefore

Reported by: bjarte.bore@gmail.com Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description

When trying to insert a stack of jQuery elements before or after another element it will fail. This did work in version 1.4.2

I created 2 examples for this

http://jsbin.com/enoni4/1 <-- latest version

http://jsbin.com/enoni4/2 <-- 1.4.2 version

Attachments (0)
Change History (1)

Changed November 18, 2010 09:28AM UTC by jitter comment:1

_comment0: → 1290072763065210
_comment1: There is no signature of `jQuery(...)` which allows wrapping an array of jQuery elements. Maybe you meant to use the `jQuery( elementArray )` signature ([http://api.jquery.com/jQuery/ jQuery() docs]). \ \ See this [http://www.jsfiddle.net/jitter/XKYaA/ test case] for the correct usage1290072834745304
_comment2: There is no signature of `jQuery( ... )` which accepts an array of jQuery objects. Maybe you meant to use the `jQuery( elementArray )` signature which accepts an array of DOM elements ([http://api.jquery.com/jQuery/ jQuery() docs]). \ \ See this [http://www.jsfiddle.net/jitter/XKYaA/ test case] for the correct usage1290072957418046
_comment3: There is no signature of `jQuery( ... )` which accepts an array of jQuery objects. Maybe you meant to use the `jQuery( elementArray )` signature which accepts an array of DOM elements ([http://api.jquery.com/jQuery/ jQuery() docs]). If this worked in 1.4.2 it was a bug that got fixed. \ \ See this [http://www.jsfiddle.net/jitter/XKYaA/ test case] for the correct usage1290102440332150
resolution: → invalid
status: newclosed

There is no signature of jQuery( ... ) which accepts an array of jQuery objects as you do in your test case. Maybe you meant to use the jQuery( elementArray ) signature which accepts an array of DOM elements (jQuery() docs). If this worked in 1.4.2 it was a bug that got fixed.

See this test case for the correct usage