Psytanium Posted May 31, 2015 Share Posted May 31, 2015 Hello, I have upgraded a website from 2.3.3.4 to 2.3.4 then equal-height jquery used in product listing stopped working. I found that replacing jquery-1.7.2.min.js with jquery-1.11.1.min.js is the reason, when i turn back the 1.7.2 , equal height works again. If someone have found a solution please let me know. thx. This is the jquery.equalheights.js content /*-------------------------------------------------------------------- * * Created by Dexter (http://cssclub.ru) * --------------------------------------------------------------------*/ function equalHeights(element) { var class_name = '.equal-height'; var maxHeight = 0; var maxItem = 0; var maxItem_adjust = 0; element.find(class_name).each(function(i){ $(this).wrapInner('<div></div>'); }); function heightChecker(){ element.find(class_name).each(function(i){ if($(this).outerHeight() > maxHeight) { maxHeight = $(this).outerHeight(); maxItem = $(this); setHeight(maxHeight); } }); maxItem_adjust = maxItem.outerHeight()-maxItem.height(); if(maxHeight > (maxItem.children().height() + maxItem_adjust)){ maxHeight = maxItem.children().height() + maxItem_adjust; setHeight(maxHeight); } setTimeout(function(){heightChecker()}, 1000) } function setHeight(target){ element.find(class_name).each(function(i){ var adjust = $(this).outerHeight()-$(this).height(); if($.browser.msie && $.browser.version < 7.0){ $(this).css({'height': target - adjust }); } else{ $(this).css({'min-height': target - adjust }); } }) } heightChecker(); } Link to comment Share on other sites More sharing options...
Psytanium Posted May 31, 2015 Author Share Posted May 31, 2015 @@multimixer Link to comment Share on other sites More sharing options...
BrockleyJohn Posted June 1, 2015 Share Posted June 1, 2015 The script in bootstrap uses jquery 1.11.1 and looks like this: <script> <!-- $(window).load(function() { var maxHeight = 0; $(".equal-height").each(function() { if ($(this).height() > maxHeight) { maxHeight = $(this).height(); } }); $(".equal-height").height(maxHeight); }); //--> </script> Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Psytanium Posted June 2, 2015 Author Share Posted June 2, 2015 @@BrockleyJohn thanks. but it script didn't work. i tried it on 1.7.2 and 1.11.1 Link to comment Share on other sites More sharing options...
BrockleyJohn Posted June 2, 2015 Share Posted June 2, 2015 works for me... see pm for link to copy of your page Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Psytanium Posted June 2, 2015 Author Share Posted June 2, 2015 works for me too. probably i missed something previously. cheers ! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.