X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=js%2Fjquery.checkall.js;h=cef64ef8bb9ec4097bba2e1ec4bcf65382e93d57;hb=bb8964ddfc59e40b62f6e65f5dd38cea9b7323d0;hp=4b530496561d9240a51fee38cedcee9a82cdd130;hpb=69862f829b1d4d45328fed73c43df9e0edd3ce8a;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')); }); } });