Commit 22099897 by vulehuan

make all items in each row same height

parent 8d3a2c4a
......@@ -8,6 +8,27 @@
//
$('.carousel').carousel();
$('a.fancybox').fancybox({'type': 'image'});
// Makes all items in each row same height (we use border)
$(window).load(function() {
$('.grid-view .row').each(function() {
var that = $(this);
var maxHeight = 0;
var maxH4Height = 0;
that.find('.item').each(function() {
if ($(this).height() > maxHeight) {
maxHeight = $(this).height();
}
var currentH4Height = $(this).find('h4').height();
if (currentH4Height > maxH4Height) {
maxH4Height = currentH4Height;
}
});
that.find('.item').each(function() {
$(this).height(maxHeight);
$(this).find('h4').height(maxH4Height);
});
});
});
});
})(jQuery);
jQuery.noConflict();
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment