This is probably a longshot but, i’m using galleriffic Jquery plugin, and i’m changing the images on the fly with javascript by using appending and replacing the img src:
$.each(paths,function(index, value) {
if(size > 0) {
var src = $('.thumbs li:nth-child('+index+')').find('img').attr('src', value);
var str = value;
var big_img=str.replace("_s","_b");
var src = $('.thumbs li:nth-child('+index+')').find('a').attr('href', big_img);
size -- ;
}
The problem I’m having is that it somehow uses a hash function to convert the image URL to display the fullsize image, and since I change the img src after the DOM is loaded any changed images are not being displayed in the viewer.
you can see the effect here
http://www.riskycode.com/wordpress/#
click on design focuses.
that’s because of the way your plugin is binding events
so before changing the images attributes you’ll have to destroy the gallerific instance;
then re-instantiate once your change of images attribute is finished
nb: very old plugin but whatever
go through this code; replace the
thisby the name of your instance; depending on your options part of the script may well be unecesary;start with
gallery.initializeThumbs();only could be enough (but won’t trigger preload i think)otherwise you add/remove images as shown there : http://www.twospy.com/galleriffic/example-4.html