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 galleryPopup = function() { 13 if( jQuery().magnificPopup) { 14 $('.gallery-link-file').each( function() { 15 var $this = $(this); 16 17 if ( $this.hasClass( 'magnificpopup-is-active' ) ) { 18 return; 19 } 20 21 $this.magnificPopup({ 22 delegate: '.gallery-item:not(.clone) .gallery-icon a', 23 gallery: { 24 enabled: true 25 }, 26 type:'image', 27 image: { 28 titleSrc: function(item) { 29 var caption = $(item.el).parent().next('.gallery-caption').html(); 30 if ( 'string' == typeof caption && caption.length > 0 ) 31 return caption; 32 33 return ''; 34 } 35 } 36 }); 37 38 $this.addClass( 'magnificpopup-is-active' ); 39 }); 40 } 41 42 }; 43 44 galleryPopup(); 45 46 // Triggers re-layout on infinite scroll 47 $( document.body ).on( 'post-load', function () { 48 galleryPopup(); 49 }); 50 51} )( 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.