diff options
Diffstat (limited to 'test/page/test.js')
-rw-r--r-- | test/page/test.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/page/test.js b/test/page/test.js new file mode 100644 index 0000000..086e191 --- /dev/null +++ b/test/page/test.js @@ -0,0 +1,33 @@ +/* see test.html for example matchHeight usage */
+
+/* testing page code only, you wont need this! */
+
+(function() {
+
+ $(function() {
+ bindTestOptions();
+ });
+
+ var bindTestOptions = function() {
+ resetTestOptions();
+ $('.option').change(resetTestOptions);
+ };
+
+ var resetTestOptions = function() {
+ // update test options
+ $('.option').each(function() {
+ var $this = $(this);
+ $('body').toggleClass($this.val(), $this.prop('checked'));
+ });
+
+ // update byRow option
+ var byRow = $('body').hasClass('test-rows');
+ $.each($.fn.matchHeight._groups, function() {
+ this.options.byRow = byRow;
+ });
+
+ // update all heights
+ $.fn.matchHeight._update();
+ };
+
+})();
\ No newline at end of file |