public
Last active

JQuery append only accepts real JS arrays, not JQuery-objects representing arrays (as map returns). Solution: Convert to JS array with makeArray.

  • Download Gist
gistfile1.js
JavaScript
1 2 3 4 5 6 7 8 9 10
$('<tr></tr>').append(
$.makeArray($(data).map(function(index, element) {
return $('<td></td>').html(element.instrument_name)
}))
).appendTo(custom_factor_table)
$('<tr></tr>').append(
$.makeArray($(data).map(function(index, element) {
return $('<td></td>').html('bla')
}))
).appendTo(custom_factor_table)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.