Skip to content

Instantly share code, notes, and snippets.

Created March 4, 2011 15:59
Show Gist options
  • Select an option

  • Save anonymous/854863 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/854863 to your computer and use it in GitHub Desktop.
$("#profileGallery .vehiclePictures").fancybox({
'onStart': function(arr, index){
if(arr.length == index+1){
// ajax call
// update #profileGallery with the last image from the previous image batch + images of next batch
$.fancybox.close(); // hide current Fancybox
$("#profileGallery .vehiclePictures:first").click() // click on the "first" image (also the last image from the previous batch)
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment