GalleryView
GalleryView copied to clipboard
Ajax loaded Gallery View
GalleryView's events doesn't fully work when loaded via ajax. The thumbnail click to change images and the small nav widget do not respond to click events. The issue is caused by generating html for the gallery inside an ajax success event and then initalizing gallery view.
To fix this issue change a couple of lines inside of bindActions, and unbindActions methods
In bindActions change:
dom.gv_navWrap.delegate('div','click.galleryview',function(){
To
$('div', dom.gv_navWrap).bind('click.galleryview', function(){
and
dom.gv_filmstripWrap.delegate('.gv_frame','click.galleryview',function(){
To
$('.gv_frame', dom.gv_filmstripWrap).bind('click.galleryview', function(){
Then in unbindActions change:
dom.gv_navWrap.undelegate('div','click.galleryview');
dom.gv_filmstripWrap.undelegate('.gv_frame','click.galleryview');
To
$('div', dom.gv_navWrap).unbind('click.galleryview');
$('.gv_frame', dom.gv_filmstripWrap).unbind('click.galleryview');