From: Sven Schöling Date: Thu, 7 Jan 2010 10:43:47 +0000 (+0100) Subject: Checkall JQuery Plugin. X-Git-Tag: release-2.6.1beta1~28 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=69862f829b1d4d45328fed73c43df9e0edd3ce8a;p=kivitendo-erp.git Checkall JQuery Plugin. --- diff --git a/js/jquery.checkall.js b/js/jquery.checkall.js new file mode 100644 index 000000000..4b5304965 --- /dev/null +++ b/js/jquery.checkall.js @@ -0,0 +1,20 @@ +/* + * jQuery SelectAll plugin 1.1 + * + * Copyright (c) 2009 Sven Schöling + */ + +;(function($) { + +$.fn.extend({ + checkall: function(target) { + var saved_this = this; + return $(this).click(function() { + $(target).each(function() { + $(this).attr('checked', $(saved_this).attr('checked')); + }); + }); + } +}); + +})(jQuery);