-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMatrix.js
36 lines (33 loc) · 1004 Bytes
/
Matrix.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
34
35
36
$('#ToggleSlider').click(function() {
$('.slider').slideToggle('slow');
return false;
});
$('table input[type=checkbox]').change(function() {
if ($(this).val() === 'Select All') {
var X = $(this).attr('name');
var isChecked = $(this).is(':checked');
$('input[name=' + X + '][type=checkbox]').prop('checked',isChecked);
if (isChecked) {
$(this).parent().prev().find('label').text('Deselect All');
} else {
$(this).parent().prev().find('label').text('Select All');
}
}
Refresh();
});
$('ul input[type=checkbox]').change(function() {
if ($(this).val() === 'Select All') {
var local = {};
local.name = $(this).attr('name');
local.isChecked = $(this).is(':checked');
local.id = $(this).attr('id');
$('input[name=' + local.name + '][type=checkbox]').prop('checked',local.isChecked);
if (local.isChecked) {
$(this).closest('li').find('label').text('Deselect All');
} else {
$(this).closest('li').find('label').text('Select All');
}
}
Refresh();
});
Refresh();