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