From 08ba746406e215791a5da269d15ba1884f161dbb Mon Sep 17 00:00:00 2001 From: Aparajith Date: Thu, 12 Aug 2021 12:35:13 +0530 Subject: [PATCH] Updated for jQuery 1.8+. --- jquery.equalheights.js | 8 ++++---- jquery.equalheights.min.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/jquery.equalheights.js b/jquery.equalheights.js index 9959218..6b6373d 100644 --- a/jquery.equalheights.js +++ b/jquery.equalheights.js @@ -1,7 +1,7 @@ /** * Equal heights little jQuery plugin by Status201 - * @version 1.0.6 - * @requires jQuery 1.7+ + * @version 1.0.7 + * @requires jQuery 1.8+ * @author Gijs Oliemans * @license MIT */ @@ -35,9 +35,9 @@ }; if ( settings.onLoad ) { - $( window ).load(function() { + $( window ).on('load',(function() { $elements.equalHeights( { onResize: false, onLoad: false } ); - }); + })); } $elements.each(function() { diff --git a/jquery.equalheights.min.js b/jquery.equalheights.min.js index 077a4d9..60ee324 100644 --- a/jquery.equalheights.min.js +++ b/jquery.equalheights.min.js @@ -1,2 +1,2 @@ -/* jQuery Equal heights plugin v. 1.0.6 by status201.nl */ -!function(i){i.fn.equalHeights=function(n){var e,o={onResize:!0,onLoad:!0},t=i.extend({},o,n),h={},s=0,u=[],a=0,d=0,c=i(this);return c.length<2?this:(t.onResize&&i(window).resize(function(){e&&window.clearTimeout(e),e=window.setTimeout(function(){c.equalHeights({onResize:!1,onLoad:!1})},100)}),t.onLoad&&i(window).load(function(){c.equalHeights({onResize:!1,onLoad:!1})}),c.each(function(){u=i(this),u.height("auto"),a=u.height(),a>0&&(d=u.position().top,s=d in h,s?a>h[d]?(h[d]=a,i(c).filter(function(){return i(this).position().top==d}).height(a)):u.height(h[d]):(h[d]=a,u.height(h[d])))}),this)}}(jQuery); +/* jQuery Equal heights plugin v. 1.0.7 by status201.nl */ +!function(i){i.fn.equalHeights=function(n){var o,e=i.extend({},{onResize:!0,onLoad:!0},n),t={},h=[],s=0,u=0,a=i(this);return a.length<2?this:(e.onResize&&i(window).resize(function(){o&&window.clearTimeout(o),o=window.setTimeout(function(){a.equalHeights({onResize:!1,onLoad:!1})},100)}),e.onLoad&&i(window).on("load",function(){a.equalHeights({onResize:!1,onLoad:!1})}),a.each(function(){(h=i(this)).height("auto"),(s=h.height())>0&&(u=h.position().top,u in t?s>t[u]?(t[u]=s,i(a).filter(function(){return i(this).position().top==u}).height(s)):h.height(t[u]):(t[u]=s,h.height(t[u])))}),this)}}(jQuery); \ No newline at end of file