1equalWideBlockHeight = function(){ 2 if($('.wide-block').length) //sliceheight for wide block 3 { 4 if(window.matchMedia('(min-width: 768px)').matches) 5 { 6 $('.wide-block').each(function(){ 7 $(this).css('height', ''); 8 var _this = $(this), 9 parent_block = _this.closest('.items'), 10 block_height = _this.actual('outerHeight', { includeMargin : true })-1, 11 margin = parseInt($('.wide-block').css('margin-bottom')), 12 equal_height = 0; 13 14 if(parent_block.find('.col-item').length) 15 { 16 parent_block.find('.col-item .item').css('height', ''); 17 parent_block.find('.col-item').each(function(){ 18 equal_height += $(this).find('.item').actual('outerHeight', { includeMargin : true }); 19 }) 20 21 if(equal_height) 22 { 23 equal_height -= margin; 24 if(equal_height >= block_height) 25 _this.css('height', equal_height); 26 else 27 { 28 equal_height += margin; 29 var last_item = parent_block.find('.col-item:last-child .item'); 30 last_item.css('height', (last_item.actual('outerHeight') + (block_height - equal_height))); 31 } 32 } 33 } 34 }) 35 } 36 else 37 { 38 $('.wide-block').css('height', ''); 39 $('.col-item .item').css('height', ''); 40 } 41 } 42} 43$(document).ready(function(){ 44 equalWideBlockHeight(); 45 46 $('.banners-small.blog img').on('load', function(){ 47 equalWideBlockHeight(); 48 $('.banners-small .item.normal-block').sliceHeight(); 49 }); 50}) 51 52BX.addCustomEvent('onWindowResize', function(eventdata) { 53 try{ 54 ignoreResize.push(true); 55 if(!jQuery.browser.safari) 56 { 57 equalWideBlockHeight(); 58 } 59 else 60 { 61 setTimeout(function() { 62 equalWideBlockHeight(); 63 }, 300); 64 } 65 } 66 catch(e){} 67 finally{ 68 ignoreResize.pop(); 69 } 70}); 71BX.addCustomEvent('onCompleteAction', function(eventdata){ 72 if(eventdata.action === 'ajaxContentLoaded') 73 { 74 $(eventdata.content).find('.item').each(function(){ 75 $('.banners-small.blog img').on('load', function(){ 76 equalWideBlockHeight(); 77 $('.banners-small .item.normal-block').sliceHeight(); 78 }); 79 }) 80 setTimeout(function(){ 81 equalWideBlockHeight(); 82 }, 350); 83 } 84});
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.