Alok Jain Alok Jain - 6 months ago 15
jQuery Question

equal height columns

I used following JS code to create equal height columns:

var colHeight = Math.max($('.3columngallery .col1').height(), $('.3columngallery .col2').height(), $('.3columngallery .col3').height());
$('.3columngallery .gallery').height(colHeight);


It's working fine in firefox and safari but not in chrome and opera.

Here's the link of the page, where i used this script: http://www.jaspreetkaur.com/gwstudio/product-gallery

Answer

If you are using images inside this container you should use

$(window).load(function ()

instead of

$(function() { 

because images are not loaded in the dom.

Comments