jquery - How to Iterate Over JavaScript Object and Display results In Specified Place? -


i have object replies:

[object { content="comment #1."}, object { content="comment #2."}]   

and have selector selects place content should placed...

$('.post .comment_this[rel="3"]').parent().parent().append(encoded.content + '<br />'); 

how iterate on object , display results in place 1 one?

replies array, can use simple for loop:

var $target = $('.post .comment_this[rel="3"]').parent().parent();  for(var = 0, l = replies.length; < l; i++) {     $target.append(replies[i].content + '<br />'); } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -