jQuery ajax get
- by Happy
There are many class="item" blocks on the page.
For each one there is different var item_link and ajax request.
Ajax searches for src attribute of .message img and throws it to var src.
$(".item").each(function(){
var item_link = "http://...";
$(this).prepend('<div class="src"></div>');
$.get(item_link, function(data) {
var src = $('.message img', data).attr('src');
});
});
How to print var src to <div class="src"></div>?
Thanks.