1/** 2 * Masonry layouts 3 * 4 * @package Icelander 5 * @copyright WebMan Design, Oliver Juhas 6 * 7 * @since 1.0.0 8 * @version 1.4.0 9 */ 10 11( function( $ ) { 12 13 'use strict'; 14 15 if ( $().masonry ) { 16 17 18 19 20 21 /** 22 * Masonry posts/products 23 */ 24 25 var 26 $isShop = $( document.body ).is( '.archive.woocommerce' ), 27 $list = ( $isShop ) ? ( $( '.products' ) ) : ( $( '.posts' ) ), 28 $itemClass = ( $isShop ) ? ( '.product' ) : ( '.entry' ); 29 30 $list 31 .imagesLoaded( function() { 32 33 // Processing 34 35 $list 36 .masonry( { 37 itemSelector : $itemClass, 38 percentPosition : true, 39 isOriginLeft : ( 'rtl' !== $( 'html' ).attr( 'dir' ) ) 40 } ); 41 42 } ); 43 44 45 46 /** 47 * Jetpack Infinite Scroll posts loading 48 */ 49 50 $( document.body ) 51 .on( 'post-load', function() { 52 53 // Processing 54 55 $list 56 .imagesLoaded( function() { 57 58 // Processing 59 60 $list 61 .masonry( 'reload' ); 62 63 } ); 64 65 } ); 66 67 68 69 70 71 } // /masonry 72 73} )( 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.