You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to pass an array of elements with no attribute object causes "String contains an invalid character" error (tested on firefox). It appears that this is because it tries to use the array as the attribute object.
$(function() {
// Passing in individual elements works.
var works = $.el.div($.el.p("A1"), $.el.p("B1"));
$('#works').html(works);
// Passing in that same array with an empty attributes object works.
var worksWithExplicitAttributes = $.el.div({}, [$.el.p("A2"), $.el.p("B2")]);
$('#worksWithExplicitAttributes').html(worksWithExplicitAttributes);
// Passing in an array of those elements fails.
var fails = $.el.div([$.el.p("A3"), $.el.p("B3")]);
$('#fails').html(fails);
})
The text was updated successfully, but these errors were encountered:
Trying to pass an array of elements with no attribute object causes "String contains an invalid character" error (tested on firefox). It appears that this is because it tries to use the array as the attribute object.
Example JSFiddle: http://jsfiddle.net/XZN8X/16/
$(function() {$.el.div($ .el.p("A1"), $.el.p("B1"));
// Passing in individual elements works.
var works =
$('#works').html(works);
})
The text was updated successfully, but these errors were encountered: