1jQuery(function($) { 2 3 /** 4 * init the different table types in frontend 5 */ 6 $('table.mce-table.mce-row-header').cardtable(); 7 $('table.mce-table.mce-col-header').stackcolumns({ thead: true }); 8 $('table.mce-table.mce-no-header').stackcolumns(); 9 $('table.stacktable').addClass('table'); 10 11 /** 12 * remove style attribute to avoid width-styles on table cells, so table layout fixed can be used 13 */ 14 $('table.stacktable tr th, table.stacktable tr td').removeAttr('style'); 15 16 /** 17 * If WP Plugin 'Lazy Load' is active use it to lazy load mce tables images 18 */ 19 if( ! $.isEmptyObject( $('table.stacktable img[data-lazy-src]') ) ) { 20 21 lazy_load_init(); 22 $( 'body' ).bind( 'post-load', lazy_load_init ); // Work with WP.com infinite scroll 23 24 function lazy_load_init() { 25 $( 'img[data-lazy-src]' ).bind( 'scrollin', { distance: 200 }, function() { 26 lazy_load_image( this ); 27 }); 28 29 // We need to force load gallery images in Jetpack Carousel and give up lazy-loading otherwise images don't show up correctly 30 $( '[data-carousel-extra]' ).each( function() { 31 $( this ).find( 'img[data-lazy-src]' ).each( function() { 32 lazy_load_image( this ); 33 } ); 34 } ); 35 } 36 37 function lazy_load_image( img ) { 38 var $img = jQuery( img ), 39 src = $img.attr( 'data-lazy-src' ); 40 41 if ( ! src || 'undefined' === typeof( src ) ) 42 return; 43 44 $img.unbind( 'scrollin' ) // remove event binding 45 .hide() 46 .removeAttr( 'data-lazy-src' ) 47 .attr( 'data-lazy-loaded', 'true' ); 48 49 img.src = src; 50 $img.fadeIn(); 51 } 52 } 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.