mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
git-svn-id: http://www.observium.org/svn/observer/trunk@2006 61d68cd4-352d-0410-923a-c4978735b2b8
21 lines
514 B
JavaScript
21 lines
514 B
JavaScript
// Checkbox manipulation function from http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery
|
|
// assumed to be under the same license as jQuery itself: MIT or GPLv2
|
|
jQuery.fn.check = function(mode) {
|
|
// if mode is undefined, use 'on' as default
|
|
var mode = mode || 'on';
|
|
return this.each(function() {
|
|
switch(mode) {
|
|
case 'on':
|
|
this.checked = true;
|
|
break;
|
|
case 'off':
|
|
this.checked = false;
|
|
break;
|
|
case 'toggle':
|
|
this.checked = !this.checked;
|
|
break;
|
|
}
|
|
});
|
|
};
|
|
|