1/* global _, jQuery */ 2 3jQuery( function ( $ ) { 4 5 var fullContainer = $( panelsStyles.fullContainer ); 6 if ( fullContainer.length === 0 ) { 7 fullContainer = $( 'body' ); 8 } 9 10 // Stretch all the full width rows 11 var stretchFullWidthRows = function () { 12 13 $( '.siteorigin-panels-stretch.panel-row-style' ).each( function () { 14 var $$ = $( this ); 15 $$.css( { 16 'margin-left': 0, 17 'margin-right': 0, 18 'padding-left': 0, 19 'padding-right': 0 20 } ); 21 22 var leftSpace = $$.offset().left - fullContainer.offset().left; 23 var rightSpace = fullContainer.outerWidth() - leftSpace - $$.parent().outerWidth(); 24 25 $$.css( { 26 'margin-left': - leftSpace, 27 'margin-right': - rightSpace, 28 'padding-left': $$.data( 'stretch-type' ) === 'full' ? leftSpace : 0, 29 'padding-right': $$.data( 'stretch-type' ) === 'full' ? rightSpace : 0 30 } ); 31 32 var cells = $$.find( '> .panel-grid-cell' ); 33 34 if ( $$.data( 'stretch-type' ) === 'full-stretched' && cells.length === 1 ) { 35 cells.css( { 36 'padding-left': 0, 37 'padding-right': 0 38 } ); 39 } 40 41 $$.css( { 42 'border-left': 0, 43 'border-right': 0 44 } ); 45 } ); 46 47 if ( $( '.siteorigin-panels-stretch.panel-row-style' ).length ) { 48 $( window ).trigger( 'panelsStretchRows' ); 49 } 50 } 51 $( window ).resize( stretchFullWidthRows ); 52 stretchFullWidthRows(); 53 54} );
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.