forked from liabru/jquery-match-height
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
33 lines (25 loc) · 783 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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.byRow = byRow;
});
// update all heights
$.fn.matchHeight._update();
};
})();