<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: jQuery shiftcheckbox plugin</title>
	<atom:link href="http://www.sanisoft.com/blog/2009/07/02/jquery-shiftcheckbox-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sanisoft.com/blog/2009/07/02/jquery-shiftcheckbox-plugin/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jquery-shiftcheckbox-plugin</link>
	<description>sharing technology, ideas, insights!</description>
	<lastBuildDate>Thu, 02 Feb 2012 08:48:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: &#187; Tutorials and plugins for dealing with web forms DESIGNLANDER</title>
		<link>http://www.sanisoft.com/blog/2009/07/02/jquery-shiftcheckbox-plugin/comment-page-1/#comment-6220</link>
		<dc:creator>&#187; Tutorials and plugins for dealing with web forms DESIGNLANDER</dc:creator>
		<pubDate>Mon, 30 Jan 2012 05:42:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.sanisoft.com/?p=224#comment-6220</guid>
		<description>[...] Demo &#124; Source page [...]</description>
		<content:encoded><![CDATA[<p>[...] Demo | Source page [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 20 jQuery Plugins and Tutorials to Enhance Forms &#124; ExceptionHandle.com</title>
		<link>http://www.sanisoft.com/blog/2009/07/02/jquery-shiftcheckbox-plugin/comment-page-1/#comment-6173</link>
		<dc:creator>20 jQuery Plugins and Tutorials to Enhance Forms &#124; ExceptionHandle.com</dc:creator>
		<pubDate>Mon, 21 Nov 2011 18:13:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.sanisoft.com/?p=224#comment-6173</guid>
		<description>[...] jQuery Shiftcheckbox Plugin [...]</description>
		<content:encoded><![CDATA[<p>[...] jQuery Shiftcheckbox Plugin [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jQuery Plugins and Tutorials to Enhance Forms &#187; Example Codes</title>
		<link>http://www.sanisoft.com/blog/2009/07/02/jquery-shiftcheckbox-plugin/comment-page-1/#comment-5921</link>
		<dc:creator>jQuery Plugins and Tutorials to Enhance Forms &#187; Example Codes</dc:creator>
		<pubDate>Sat, 02 Jul 2011 06:25:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.sanisoft.com/?p=224#comment-5921</guid>
		<description>[...] The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX. The main methods, ajaxForm and ajaxSubmit, gather information from the form element to determine how to manage the submit process. Both of these methods support numerous options which allows you to have full control over how the data is submitted. Submitting a form with AJAX doesn&#8217;t get any easier than this! jQuery Shiftcheckbox Plugin [...]</description>
		<content:encoded><![CDATA[<p>[...] The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX. The main methods, ajaxForm and ajaxSubmit, gather information from the form element to determine how to manage the submit process. Both of these methods support numerous options which allows you to have full control over how the data is submitted. Submitting a form with AJAX doesn&#8217;t get any easier than this! jQuery Shiftcheckbox Plugin [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 20 jQuery Plugins and Tutorials to Enhance Forms &#124; 冷风留痕</title>
		<link>http://www.sanisoft.com/blog/2009/07/02/jquery-shiftcheckbox-plugin/comment-page-1/#comment-5894</link>
		<dc:creator>20 jQuery Plugins and Tutorials to Enhance Forms &#124; 冷风留痕</dc:creator>
		<pubDate>Sun, 19 Jun 2011 14:01:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.sanisoft.com/?p=224#comment-5894</guid>
		<description>[...] jQuery Shiftcheckbox Plugin [...]</description>
		<content:encoded><![CDATA[<p>[...] jQuery Shiftcheckbox Plugin [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Ardmore</title>
		<link>http://www.sanisoft.com/blog/2009/07/02/jquery-shiftcheckbox-plugin/comment-page-1/#comment-4593</link>
		<dc:creator>John Ardmore</dc:creator>
		<pubDate>Tue, 07 Dec 2010 11:13:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.sanisoft.com/?p=224#comment-4593</guid>
		<description>hi, congratulations for the project

what i want to achieve is make this script work with two ( or more ) separate groups of check-boxes !
is it possible ?! how ?!

thank you.</description>
		<content:encoded><![CDATA[<p>hi, congratulations for the project</p>
<p>what i want to achieve is make this script work with two ( or more ) separate groups of check-boxes !<br />
is it possible ?! how ?!</p>
<p>thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mårten</title>
		<link>http://www.sanisoft.com/blog/2009/07/02/jquery-shiftcheckbox-plugin/comment-page-1/#comment-4306</link>
		<dc:creator>Mårten</dc:creator>
		<pubDate>Tue, 19 Oct 2010 11:54:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.sanisoft.com/?p=224#comment-4306</guid>
		<description>Hi, I added support for a &quot;check all&quot; checkbox. This check all could be in the column header if the shiftcheckboxes are in a table.

Just call $(&#039;.&#039;).shiftcheckbox(&#039;#) in $(document).ready

&lt;code&gt;
(function($) {
    $.fn.shiftcheckbox = function(checkAllId) {
        var prevChecked = null;

        selectorStr = this;
        allCbId = checkAllId;
        $(selectorStr).bind(&quot;click&quot;, handleClick);
        if (allCbId != null) {
            $(allCbId).bind(&quot;click&quot;, handleAllClick);
        }

    };

    function handleAllClick(event) {
        var checkStatus = this.checked; // set all the checkboxes as selected
        $(selectorStr).each(function() {
            this.checked = checkStatus;
        })
    }

    function handleClick(event) {
        var val = this.value;
        var checkStatus = this.checked;
        var allChecked = checkStatus;
        //get the checkbox number which the user has checked

        //check whether user has pressed shift
        if (event.shiftKey) {
            if (prevChecked != &#039;null&#039;) {
                //get the current checkbox number
                var ind = 0, found = 0, currentChecked;
                currentChecked = getSelected(val);

                ind = 0;

                $(selectorStr).each(function(i) {

                    if (currentChecked = currentChecked &amp;&amp; ind = prevChecked &amp;&amp; ind &lt;= currentChecked) {
                            this.checked = checkStatus;
                        }
                    }
                    ind++;
                    allChecked = allChecked &amp;&amp; this.checked;
                });

                prevChecked = currentChecked;

            }
        } else {
            if (checkStatus) {
                prevChecked = getSelected(val);

            }
            $(selectorStr).each(function() {
                allChecked = allChecked &amp;&amp; this.checked;
            });
        }
        if (allCbId != null) {
            $(allCbId).attr(&quot;checked&quot;, allChecked); // set &quot;all&quot; checkbox to checked 
        }
    };

    function getSelected(val) {
        var ind = 0, found = 0, checkedIndex;

        $(selectorStr).each(function(i) {
            if (val == this.value &amp;&amp; found != 1) {
                checkedIndex = ind;
                return false; // break loop
            }
            ind++;
            return true;
        });

        return checkedIndex;
    };
})(jQuery);
&lt;/code&gt;

Cheers!</description>
		<content:encoded><![CDATA[<p>Hi, I added support for a &#8220;check all&#8221; checkbox. This check all could be in the column header if the shiftcheckboxes are in a table.</p>
<p>Just call $(&#8216;.&#8217;).shiftcheckbox(&#8216;#) in $(document).ready</p>
<p><code><br />
(function($) {<br />
    $.fn.shiftcheckbox = function(checkAllId) {<br />
        var prevChecked = null;</p>
<p>        selectorStr = this;<br />
        allCbId = checkAllId;<br />
        $(selectorStr).bind("click", handleClick);<br />
        if (allCbId != null) {<br />
            $(allCbId).bind("click", handleAllClick);<br />
        }</p>
<p>    };</p>
<p>    function handleAllClick(event) {<br />
        var checkStatus = this.checked; // set all the checkboxes as selected<br />
        $(selectorStr).each(function() {<br />
            this.checked = checkStatus;<br />
        })<br />
    }</p>
<p>    function handleClick(event) {<br />
        var val = this.value;<br />
        var checkStatus = this.checked;<br />
        var allChecked = checkStatus;<br />
        //get the checkbox number which the user has checked</p>
<p>        //check whether user has pressed shift<br />
        if (event.shiftKey) {<br />
            if (prevChecked != 'null') {<br />
                //get the current checkbox number<br />
                var ind = 0, found = 0, currentChecked;<br />
                currentChecked = getSelected(val);</p>
<p>                ind = 0;</p>
<p>                $(selectorStr).each(function(i) {</p>
<p>                    if (currentChecked = currentChecked &amp;&amp; ind = prevChecked &amp;&amp; ind &lt;= currentChecked) {<br />
                            this.checked = checkStatus;<br />
                        }<br />
                    }<br />
                    ind++;<br />
                    allChecked = allChecked &amp;&amp; this.checked;<br />
                });</p>
<p>                prevChecked = currentChecked;</p>
<p>            }<br />
        } else {<br />
            if (checkStatus) {<br />
                prevChecked = getSelected(val);</p>
<p>            }<br />
            $(selectorStr).each(function() {<br />
                allChecked = allChecked &amp;&amp; this.checked;<br />
            });<br />
        }<br />
        if (allCbId != null) {<br />
            $(allCbId).attr(&quot;checked&quot;, allChecked); // set &quot;all&quot; checkbox to checked<br />
        }<br />
    };</p>
<p>    function getSelected(val) {<br />
        var ind = 0, found = 0, checkedIndex;</p>
<p>        $(selectorStr).each(function(i) {<br />
            if (val == this.value &amp;&amp; found != 1) {<br />
                checkedIndex = ind;<br />
                return false; // break loop<br />
            }<br />
            ind++;<br />
            return true;<br />
        });</p>
<p>        return checkedIndex;<br />
    };<br />
})(jQuery);<br />
</code></p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aditya Mooley</title>
		<link>http://www.sanisoft.com/blog/2009/07/02/jquery-shiftcheckbox-plugin/comment-page-1/#comment-3963</link>
		<dc:creator>Aditya Mooley</dc:creator>
		<pubDate>Mon, 09 Aug 2010 02:54:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.sanisoft.com/?p=224#comment-3963</guid>
		<description>Yes, that&#039;s the reason for adding class names :)</description>
		<content:encoded><![CDATA[<p>Yes, that&#8217;s the reason for adding class names <img src='http://www.sanisoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Uli</title>
		<link>http://www.sanisoft.com/blog/2009/07/02/jquery-shiftcheckbox-plugin/comment-page-1/#comment-3960</link>
		<dc:creator>Uli</dc:creator>
		<pubDate>Sun, 08 Aug 2010 20:48:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.sanisoft.com/?p=224#comment-3960</guid>
		<description>Forgetful me! 
&lt;cite&gt;You can have as many checkbox groups as you want on the same page as long as each group has a unique CSS class name attached to it.&lt;/cite&gt;</description>
		<content:encoded><![CDATA[<p>Forgetful me!<br />
<cite>You can have as many checkbox groups as you want on the same page as long as each group has a unique CSS class name attached to it.</cite></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Uli</title>
		<link>http://www.sanisoft.com/blog/2009/07/02/jquery-shiftcheckbox-plugin/comment-page-1/#comment-3959</link>
		<dc:creator>Uli</dc:creator>
		<pubDate>Sun, 08 Aug 2010 20:25:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.sanisoft.com/?p=224#comment-3959</guid>
		<description>Hi Aditya, 

why did you prefer the class selector over &quot;input[type=checkbox&quot;? I just tried to implement the plugin in the admin of my CMS and remarked input[type=checkbox works. Will it have any disadvantages?

Thanks again!
Uli</description>
		<content:encoded><![CDATA[<p>Hi Aditya, </p>
<p>why did you prefer the class selector over &#8220;input[type=checkbox&#8221;? I just tried to implement the plugin in the admin of my CMS and remarked input[type=checkbox works. Will it have any disadvantages?</p>
<p>Thanks again!<br />
Uli</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Azan</title>
		<link>http://www.sanisoft.com/blog/2009/07/02/jquery-shiftcheckbox-plugin/comment-page-1/#comment-3936</link>
		<dc:creator>Azan</dc:creator>
		<pubDate>Thu, 05 Aug 2010 15:53:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.sanisoft.com/?p=224#comment-3936</guid>
		<description>How to use shiftcheckbox with jquery.tablesorter.pager.js?
Thanks！</description>
		<content:encoded><![CDATA[<p>How to use shiftcheckbox with jquery.tablesorter.pager.js?<br />
Thanks！</p>
]]></content:encoded>
	</item>
</channel>
</rss>

