do not load next page if justifiedGallery() is not ready yet

This commit is contained in:
marijus
2014-09-12 21:04:43 +02:00
parent 59c537b06d
commit bd2139d16a
2 changed files with 5 additions and 4 deletions

View File

@@ -705,6 +705,7 @@ function updateConvItems(mode,data) {
}
function justifyPhotos(bParam_page) {
justifiedGalleryActive = true;
$('#photo-album-contents-' + bParam_page).justifiedGallery({
lastRow : 'nojustify',
captions: true,
@@ -718,7 +719,7 @@ function updateConvItems(mode,data) {
'lt640': '',
'lt1024': ''
}
});
}).on('jg.complete', function(e){ justifiedGalleryActive = false; });
}
function notify_popup_loader(notifyType) {
@@ -1136,7 +1137,7 @@ $(window).scroll(function () {
}
if($(window).scrollTop() + $(window).height() == $(document).height()) {
if((pageHasMoreContent) && (! loadingPage)) {
if((pageHasMoreContent) && (! loadingPage) && (! justifiedGalleryActive)) {
$('#more').hide();
$('#no-more').hide();