diff options
author | Korri <korrigan33@gmail.com> | 2013-08-09 12:09:54 -0400 |
---|---|---|
committer | Korri <korrigan33@gmail.com> | 2013-08-09 12:09:54 -0400 |
commit | c81f11d9a4330b0f69708e82756d4c9a55c5d85a (patch) | |
tree | be118083cb0e33da38a5472f2e7b3d54e0bc663c | |
parent | 100979cba3754ecdb305b022bc52151be04a091c (diff) | |
download | jQuery.equalHeights-c81f11d9a4330b0f69708e82756d4c9a55c5d85a.zip jQuery.equalHeights-c81f11d9a4330b0f69708e82756d4c9a55c5d85a.tar.gz jQuery.equalHeights-c81f11d9a4330b0f69708e82756d4c9a55c5d85a.tar.bz2 |
Allow multiple data-heights on the same page
-rw-r--r-- | jquery.equalheights.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/jquery.equalheights.js b/jquery.equalheights.js index 35c9d37..17f6b73 100644 --- a/jquery.equalheights.js +++ b/jquery.equalheights.js @@ -24,8 +24,10 @@ }; // auto-initialize plugin - var target = $('[data-heights="equal"]').attr('data-targets'), - init = '[data-heights="equal"] ' + target; - $(init).equalHeights(); + $('[data-heights="equal"]').each(function(){ + var $this = $(this), + target = $this.data('targets'); + $this.find(target).equalHeights(); + }); })(jQuery); |