1jQuery(document).on('load', '.product img', function() { 2 jQuery('.product img,.eithumb', this).each(function() { 3 ei_set_orientation_class(this); 4 }); 5}); 6var eiobserver = new MutationObserver(function(mutations) { 7 jQuery('.product img:not(.eiportrait,eilandscape), .eithumb:not(.eiportrait,eilandscape)').each(function() { 8 ei_set_orientation_class(this); 9 }); 10}); 11 12jQuery(document).ready(function() { 13 jQuery('.product img, .eithumb').each(function() { 14 ei_set_orientation_class(this); 15 }); 16 jQuery('.products').each(function() { 17 eiobserver.observe(this, {attributes:false, childList:true, characterData:false}); 18 }); 19}); 20function ei_set_orientation_class(eiimage) { 21 h = jQuery(eiimage).parent().height(); 22 w = jQuery(eiimage).parent().width(); 23 jQuery(eiimage).parent().css('overflow', 'hidden'); 24 if (jQuery(eiimage).height() > jQuery(eiimage).width()) { 25 jQuery(eiimage).addClass('eiportrait'); 26 if (h >= w) { 27// jQuery(eiimage).height(h); 28 } else { 29// jQuery(eiimage).width(w); 30 } 31 } else { 32 jQuery(eiimage).addClass('eilandscape'); 33 if (w >= h && 1==2) { 34 jQuery(eiimage).height(h); 35 jQuery(eiimage).css('width', 'auto'); 36 jQuery(eiimage).css('left', (jQuery(eiimage).width() - w)/-2); 37 } else { 38// jQuery(eiimage).width(w); 39 } 40 } 41}
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.