X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=js%2Fjquery.checkall.js;h=cef64ef8bb9ec4097bba2e1ec4bcf65382e93d57;hb=3dc3b056259f35b6fcf6656da6a652c024fee3b5;hp=4b530496561d9240a51fee38cedcee9a82cdd130;hpb=61680d91336abb94a24ec74f54ea6852731a949f;p=kivitendo-erp.git diff --git a/js/jquery.checkall.js b/js/jquery.checkall.js index 4b5304965..cef64ef8b 100644 --- a/js/jquery.checkall.js +++ b/js/jquery.checkall.js @@ -7,12 +7,11 @@ ;(function($) { $.fn.extend({ - checkall: function(target) { - var saved_this = this; + checkall: function(target, property) { + if (property == null) + property = 'checked'; return $(this).click(function() { - $(target).each(function() { - $(this).attr('checked', $(saved_this).attr('checked')); - }); + $(target).prop(property, $(this).prop('checked')); }); } });