1/** 2 * @author Chris Baldelomar 3 * @website http://wordpresscanvas.com/ 4 */ 5 6( function( $ ) { 7 "use strict"; 8 9 var body = $( 'body' ), 10 _window = $( window ); 11 12 var initGallery = function() { 13 if( jQuery().wcflexslider) { 14 $('.wcflexslider-container').each( function() { 15 var $this = $(this); 16 if ( $this.is(':hidden') ) { 17 return; 18 } 19 20 if ( $this.hasClass( 'wcflexslider-is-active' ) ) { 21 return; 22 } 23 24 var $flex = $(this).children('.gallery.wcflexslider'); 25 var columns = parseInt( $flex.data('columns') ); 26 var columnsTablet = columns - 1; 27 var columnsPhone = columns - 2; 28 var gutterWidth = $flex.data('gutterWidth'); 29 var hideControls = $flex.data('hideControls'); 30 var showNav = hideControls ? false : true; 31 var containerWidth = $this.width(); 32 33 $this.addClass('wcflexslider-is-active'); 34 35 gutterWidth = parseInt( gutterWidth ); 36 37 imagesLoaded( $flex, function() { 38 if ( $flex.hasClass('wcslider') ) { 39 $flex.wcflexslider({ 40 prevText: "", 41 nextText: "", 42 smoothHeight: true, 43 slideshow: false, 44 directionNav: showNav, 45 animation:"fade" 46 }); 47 } 48 else if ( $flex.hasClass('wcslider2') ) { 49 $flex.wcflexslider({ 50 prevText: "", 51 nextText: "", 52 smoothHeight: true, 53 slideshow: false, 54 directionNav: showNav, 55 animation:"slide" 56 }); 57 } 58 else if ( $flex.hasClass('wcsliderauto') ) { 59 $flex.wcflexslider({ 60 prevText: "", 61 nextText: "", 62 smoothHeight: true, 63 slideshow: true, 64 directionNav: showNav, 65 animation:"slide" 66 }); 67 } 68 else if ( $flex.hasClass('wccarousel') ) { 69 $flex.wcflexslider({ 70 prevText: "", 71 nextText: "", 72 smoothHeight: false, 73 slideshow: false, 74 directionNav: showNav, 75 animation: "slide", 76 animationLoop: false, 77 itemWidth: 270, 78 itemMargin: gutterWidth 79 }); 80 } 81 else if ( $flex.hasClass('wcslider3bottomlinks') || $flex.hasClass('wcslider4bottomlinks') ) { 82 $flex.wcflexslider({ 83 prevText: "", 84 nextText: "", 85 smoothHeight: true, 86 slideshow: true, 87 directionNav: showNav, 88 animation:"slide" 89 }); 90 } 91 }); 92 }); 93 } 94 }; 95 96 initGallery(); 97 98 // Triggers re-layout on infinite scroll 99 $( document.body ).on( 'post-load', function () { 100 initGallery(); 101 }); 102 103} )( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.