Because of jQuery, I've been able to indulge my laziness to the max, but the real benefit has been spending most time on the good stuff and less on the tedious. I'd like to further that.
Currently, I'll have some HTML like so:
<div id="id1"></div>
<div id="id2"></div>
<div...
and so on.
Then, I'll call ajax
, expecting the object "ids" to be the same as the div ids like so:
$.ajax({
success: function (msg) {
$("#id1").text(msg.id1);
$("#id2").text(msg.id2);
$("#...
and so on.
Can this be reduced to a "one-liner"? Specifically, I don't know how to use the ids of the div
s in the response object array.
Many thanks in advance!