Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>May be you should use setInterval(100):</p> <pre><code>setInterval(100); var defaults = { height:null, minHeight: 0, maxHeight: null }; </code></pre> <p>Or if you can catch image resize event use global variable to ensure that image resized and setInterval </p> <p>--- Update</p> <p>You can try this:</p> <pre><code>function func(obj, options) { //cache the children (is this the parent or a group of elements) var children = (obj.length &gt; 1) ? obj: obj.children(); if(options.height !== null){ //if specific height is set children.height(options.height); }else{ //set the height to auto which releases the boxes heights children.css('height', 'auto'); //loop though the elements and get their heights children.each(function () { //if bigger than the default set to default if ($(obj).height() &gt; options.minHeight) options.minHeight= $(obj).height(); //if maxheight is set if(options.maxHeight !== null){ if(options.minHeight &gt; options.maxHeight) options.minHeight= options.maxHeight; } }); //set the height on all the children children.height(options.minHeight); } return obj; } //this closure reserves the $. (function ($) { $.fn.extend({ equalHeight: function (options) { //set default height to 0 or auto var defaults = { delay = false; delayCount = 0; height:null, minHeight: 0, maxHeight: null }; //merge options options = $.extend(defaults, options); //delay if (delay) return setTimeout(func, delayCount); } }); })(jQuery); </code></pre> <p>Use following to run with delay</p> <pre><code>$('#parent').equalHeight({ delay: true, delayCount: 100}); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload