I'm having trouble updating elements from JavaScript. My project is fairly complex but here's a tiny piece of it:
myWebService(/*...*/)
.done(function (result) {
var newRows = $(rows).clone();
$('#drop-placeholder').after(newRows);
$(newRows).data('test', 'ZZZZZZZZZZZZZZZZZZZZZZZ');
}
Using Chrome, I can watch these statements execute. However, with newRows
in the watch window, I can see that the attribute never gets added/updated. And, sure enough, after the call is done, I don't see the specified attribute on my page.
Can anyone see what I might be missing. rows
(and therefore newRows
) represents any number of table row elements.