简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM