????
| Current Path : /home2/morganrand/www/wp-content/themes/wanderfuls/js/infinite-scroll/ |
| Current File : /home2/morganrand/www/wp-content/themes/wanderfuls/js/infinite-scroll/infinitescroll-standard.js |
( function( $ ) {
"use strict";
// Run on window loaded
$( window ).load( function() {
// Get infinite scroll container
var $container = $('#blog-entries');
// Start infinite sccroll
$container.infinitescroll( {
loading : {
msg : null,
finishedMsg : null,
msgText : '<div class="infinite-scroll-loader">'+ tbInfiniteScroll.msgText +'</div>',
},
navSelector : 'div.infinite-scroll-nav',
nextSelector : 'div.infinite-scroll-nav div.older-posts a',
itemSelector : '.blog-entry',
},
// Callback function
function( newElements ) {
var $newElems = $( newElements ).css( {
opacity : 0
} );
$newElems.imagesLoaded( function() {
// Animate new Items
$newElems.animate( {
opacity : 1
} );
// Tipsy
$( 'a.tooltip-left' ).tipsy( {
fade : true,
gravity : 'e'
} );
$( 'a.tooltip-right' ).tipsy( {
fade : true,
gravity : 'w'
} );
$( 'a.tooltip-up' ).tipsy( {
fade : true,
gravity : 's'
} );
$( 'a.tooltip-down' ).tipsy( {
fade : true,
gravity : 'n'
} );
// Gallery Slider
if($.fn.imagesLoaded!=undefined&&$.fn.sliderPro!=undefined){
$(".tb-slider").each(function(){var e=$(this),i=e.data(),t="undefined"!=typeof i.animationSpeed?i.animationSpeed:600,o="undefined"!=typeof i.loop?i.loop:!1,n="undefined"!=typeof i.fade?i.fade:600,a="undefined"!=typeof i.direction?i.direction:"horizontal",d="undefined"!=typeof i.autoplay?i.autoplay:!0,u="undefined"!=typeof i.autoPlayDelay?i.autoPlayDelay:5e3,l="undefined"!=typeof i.touchSwipe?i.touchSwipe:!0,f="undefined"!=typeof i.buttons?i.buttons:!0,r="undefined"!=typeof i.arrows?i.arrows:!0,p="undefined"!=typeof i.fadeArrows?i.fadeArrows:!0,s="undefined"!=typeof i.shuffle?i.shuffle:!1,h="undefined"!=typeof i.fullscreen?i.fullscreen:!1,y="undefined"!=typeof i.slideDistance?i.slideDistance:0,m="undefined"!=typeof i.heightAnimationDuration?i.heightAnimationDuration:500,c="undefined"!=typeof i.thumbnailPointer?i.thumbnailPointer:!1,b="undefined"!=typeof i.thumbnailHeight?i.thumbnailHeight:70,g="undefined"!=typeof i.thumbnailWidth?i.thumbnailWidth:70,w="undefined"!=typeof i.updateHash?i.updateHash:!1,A="undefined"!=typeof i.fadeCaption?i.fadeCaption:!0,D="undefined"!=typeof i.autoHeight?i.autoHeight:!0;$(".tb-slider-slide, .tb-slider-thumbnails").css({opacity:1,display:"block"}),e.sliderPro({responsive:!0,width:"100%",height:"300",fade:n,touchSwipe:l,fadeDuration:t,slideAnimationDuration:t,autoHeight:D,heightAnimationDuration:m,arrows:r,fadeArrows:p,autoplay:d,autoplayDelay:u,buttons:f,shuffle:s,orientation:a,loop:o,keyboard:!1,fullScreen:h,slideDistance:y,thumbnailHeight:b,thumbnailWidth:g,thumbnailPointer:c,updateHash:w,thumbnailArrows:!1,fadeThumbnailArrows:!1,thumbnailTouchSwipe:!0,fadeCaption:A,captionFadeDuration:500,waitForLayers:!0,autoScaleLayers:!0,forceSize:"none",thumbnailPosition:"bottom",reachVideoAction:"playVideo",leaveVideoAction:"pauseVideo",endVideoAction:"nextSlide",init:function(){e.prev(".tb-slider-preloaderimg").hide(),e.parent(".gallery-format-post-slider")&&$(".blog-masonry-grid").length&&setTimeout(function(){$(".blog-masonry-grid").isotope("layout")},m+1)},gotoSlideComplete:function(){e.parent(".gallery-format-post-slider")&&$(".blog-masonry-grid").length&&$(".blog-masonry-grid").isotope("layout")}})});
}
// Lightbox
if ( $.fn.iLightBox != undefined) {
tbLocalize.lightboxArrows="1"===tbLocalize.lightboxArrows?!0:!1,tbLocalize.lightboxThumbnails="1"===tbLocalize.lightboxThumbnails?!0:!1,tbLocalize.lightboxFullScreen="1"===tbLocalize.lightboxFullScreen?!0:!1,tbLocalize.lightboxMouseWheel="1"===tbLocalize.lightboxMouseWheel?!0:!1,tbLocalize.lightboxTitles="1"===tbLocalize.lightboxTitles?!0:!1,$(".tb-lightbox, .wpb_single_image.image-lightbox a").each(function(){var e=$(this),i=e.data(),l="undefined"!=typeof i.skin?i.skin:tbLocalize.lightboxSkin;e.iLightBox({skin:l,controls:{fullscreen:tbLocalize.lightboxFullScreen}})}),$(".tb-lightbox-video, .wpb_single_image.video-lightbox a, .tb-lightbox-autodetect, .tb-lightbox-autodetect a").iLightBox({skin:tbLocalize.LightboxSkin,path:"horizontal",smartRecognition:!0,show:{title:tbLocalize.lightboxTitles},controls:{fullscreen:tbLocalize.lightboxFullScreen,mousewheel:tbLocalize.lightboxMouseWheel}}),$(".lightbox-group").each(function(){var e=$(this),i=e.find("a.tb-lightbox-group-item"),l=e.data(),o="undefined"!=typeof l.skin?l.skin:tbLocalize.lightboxSkin,t="undefined"!=typeof l.path?l.path:"horizontal",x="undefined"!=typeof l.arrows?l.arrows:tbLocalize.lightboxArrows,a="undefined"!=typeof l.thumbnails?l.thumbnails:tbLocalize.lightboxThumbnails;i.iLightBox({skin:o,path:t,show:{title:tbLocalize.lightboxTitles},controls:{arrows:x,thumbnail:a,fullscreen:tbLocalize.lightboxFullScreen,mousewheel:tbLocalize.lightboxMouseWheel}})}),$(".tb-lightbox-gallery").on(tbLocalize.isMobile?"touchstart":"click",function(e){e.preventDefault();var i=$(this).data("gallery").split(",");i&&$.iLightBox(i,{skin:tbLocalize.lightboxSkin,path:"horizontal",show:{title:tbLocalize.lightboxTitles},controls:{arrows:tbLocalize.lightboxArrows,thumbnail:tbLocalize.lightboxThumbnails,fullscreen:tbLocalize.lightboxFullScreen,mousewheel:tbLocalize.lightboxMouseWheel}})});
}
} );
} );
} );
} )( jQuery );