在这里,我有点击它的 jquery,它只在我点击一个 li 时才有效,但我想让它在页面加载时工作,请帮助...!
//User clicks on a city / gallery;
$fp_galleries.bind('click',function(){
$fp_galleries.removeClass('current');
var $gallery = $(this);
$gallery.addClass('current');
var gallery_index = $gallery.index();
if(gallery_idx == gallery_index)
return;
gallery_idx = gallery_index;
//close the gallery and slider if opened
if($fp_thumbContainer.data('opened')==true){
$fp_scrollWrapper.fadeOut();
$fp_thumbContainer.stop().animate({'height':'0px'},200,function(){
openGallery($gallery);
});
}
else
openGallery($gallery);
});