Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Equal height failed after upgrade to 2.3.4


Psytanium

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...