summaryrefslogtreecommitdiffstats
path: root/jquery.equalheights.js
diff options
context:
space:
mode:
Diffstat (limited to 'jquery.equalheights.js')
-rw-r--r--jquery.equalheights.js8
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);