Skip to content Skip to sidebar Skip to footer

Jquery Image Preview That Work On Ajax Embedded Image Links?

there are various good jquery image preview plugins out there. however, all of the ones i've tested havent worked on image links that are embedded in the DOM with ajax. i have test

Solution 1:

adding it to the mouseover will not help, as the whole point is to preload the images before they get moused over ... (so that they are available at mouseover)..

you should add the $('a.preview').imgPreview(...) right after you attach the new links (from ajax) to the dom ..


Solution 2:

using the same plugin and with ajax this work perfectly:

.
.
.
$.post("ajax/showAlbum.php", { directory: "whatever" },
   function(data) {$('#first').append(data);
$('#first a').imgPreview({
    preloadImages:      'true',
    });
.
.
.

Post a Comment for "Jquery Image Preview That Work On Ajax Embedded Image Links?"