X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8cf7d0a1f3279c2f1aefae70c6d5689da5156460..30723c32d3a1d71b665f69777edd93c672f03c04:/js/jquery.checkall.js 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')); }); } });