I\'m trying to load an image from a given link
var imgPath = $(imgLink).attr(\'href\');
and append it to the page, so I can insert it i
$('
').load(function() {
$(this).width(some).height(some).appendTo('#some_target');
});
If you want to do for several images then:
function loadImage(path, width, height, target) {
$('
').load(function() {
$(this).width(width).height(height).appendTo(target);
});
}
Use:
loadImage(imgPath, 800, 800, '#some_target');