X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/87e65e6c1cc64bfb2d73b6914ed2ef136861dd42..d59576d22d6c7720c0078b3e17232c81bbaf9373:/js/jquery.checkall.js diff --git a/js/jquery.checkall.js b/js/jquery.checkall.js index cef64ef8b..5556d7ad7 100644 --- a/js/jquery.checkall.js +++ b/js/jquery.checkall.js @@ -1,17 +1,17 @@ /* * jQuery SelectAll plugin 1.1 * - * Copyright (c) 2009 Sven Schöling + * Copyright (c) 2009 Sven Schöling */ ;(function($) { $.fn.extend({ - checkall: function(target, property) { + checkall: function(target, property, inverted) { if (property == null) property = 'checked'; return $(this).click(function() { - $(target).prop(property, $(this).prop('checked')); + $(target).prop(property, inverted ? !$(this).prop('checked') : $(this).prop('checked')); }); } });