Side navigation
#14784 closed bug (notabug)
Opened February 11, 2014 04:59PM UTC
Closed February 13, 2014 08:51PM UTC
$.merge does not work in IE8 as it does in IE9
Reported by: | CBribiescas@gmail.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I'm using $.merge to merge two set of rows together, however the same code doesn't work in IE8, but it does in IE9. The following code doesn't get to the fourth line.
1. var rowHeaders = $(".tblRowHeaders")[0].rows; 2. var rowData = $(".tblData")[0].rows; 3. var all = $.merge(rowData,rowHeaders); 4. alert('works');
You can work around it by doing changing the 3th line to
3. var all = $.merge($(rowData),$(rowHeaders));
I believe this to be a bug, but it may be that the original usage isn't legitimate.
Attachments (0)
Change History (2)
Changed February 12, 2014 10:55PM UTC by comment:1
Changed February 13, 2014 08:51PM UTC by comment:2
resolution: | → notabug |
---|---|
status: | new → closed |
From http://api.jquery.com/jQuery.merge/:
The $.merge() function is destructive. It alters the first parameter to add the items from the second.
The first argument to jQuery.merge
must be mutable (unlike the rows
HTMLCollection from your example). Even though IE9 doesn't generate an exception, the operation isn't successful: http://jsbin.com/tosep/1
Could you provide a test case?