/* Equal Heights */
function initFixEqualHeights(){
fixEqualHeights($document);
$(window).on('resize orientationchange', function(){
fixEqualHeights($document);
});
}
function fixEqualHeights($domElement) {
$('.products', $domElement).each(function(){
var maxH = 0, $wrapper = $(this);
$('.ftc-product', $wrapper).each(function(){
var $obj = $(this), h = 0;
$obj.css('height','auto');
h = $obj.outerHeight();
if (h>maxH) {
maxH = h;
}
if(maxH < 450)
maxH = 450;
}).promise().done(function(){
if(maxH === 0)
maxH = 'auto';
$('.ftc-product', $wrapper).height(maxH);
});
});
}
Get the biggest element and apply this height for all boxes.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.