Reply – Re: Documents loaded through ajax, shadowbox not working
Your Name
Subject
Message
or Cancel
In Reply To
Re: Documents loaded through ajax, shadowbox not working
— by mmkader85 mmkader85
Hi,

     I had the same problem on loading the images via ajax and reached this thread to get it fixed.. thanks a lot..

     I end up another problem. Im showing up the gallery of images(having 20 pics) from webalbum with anchor tag surrounds it having rel = "shadowbox[My Gallery];width=xxx;height=xxx" for all pictures.. Its actually an ajax which is inserting the pics into a container div. Upon success ajax call, im calling the below two lines.

Shadowbox.init({ skipSetup: true });
setUpShadowBox();


The function setUpShadowBox is
function setUpShadowBox(){
        Shadowbox.setup("a.picasa_pics", {
                handleOversize: "resize"
        });
};


       Everything is fine upto now.. Now, user can refresh the container images by ajax call (given a button for the user to reload the pictures; so as to get the latest pics from the webalbum).. This also loads fine and i can still the shadowbox for the newly loaded images. But, the image counter used to show in the shadowbox increases by 20(no of images loaded) for every ajax load..

       If clicked on third image for the first time ajax call, it shows 3 of 20.. After the next ajax call, if clicked on the same third image then it shows 3 of 40.. next it is 3 of 60.. and it keeps going on..

       Can anyone help me fixing this..?

Thanks