From 69862f829b1d4d45328fed73c43df9e0edd3ce8a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 7 Jan 2010 11:43:47 +0100 Subject: [PATCH] Checkall JQuery Plugin. --- js/jquery.checkall.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 js/jquery.checkall.js 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); -- 2.20.1