<?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: Collapsible Checkbox Tree jQuery Plugin</title>
	<atom:link href="http://www.redcarrot.co.uk/2009/11/11/collapsible-checkbox-tree-jquery-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.redcarrot.co.uk/2009/11/11/collapsible-checkbox-tree-jquery-plugin/</link>
	<description>Red Carrot is a popular web design agency based in Ashford, Kent.</description>
	<lastBuildDate>Thu, 12 Aug 2010 18:00:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Artur</title>
		<link>http://www.redcarrot.co.uk/2009/11/11/collapsible-checkbox-tree-jquery-plugin/comment-page-1/#comment-80</link>
		<dc:creator>Artur</dc:creator>
		<pubDate>Thu, 12 Aug 2010 18:00:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.redcarrot.co.uk/?p=222#comment-80</guid>
		<description>hi
there is an issue when tree ul element is inside some another list. In this case first checkbox is always checked. 
To fix this I had to add extra &quot; &gt; ul&quot; in jQuery selector for both cases when defaults.checkParents is true.

&lt;code&gt;
// Check parents if necessary
            if (defaults.checkParents) {
                $(&quot;input:checked&quot;).parents(&quot;ul &gt; li&quot;).find(&quot;input[type=&#039;checkbox&#039;]:first&quot;).attr(&#039;checked&#039;, true);
            }
&lt;/code&gt;

I&#039;m sure it may be done smarter way, but I&#039;m not very good in js and jQuery.
Btw: Thanks for this nice ale lightweight script! :)</description>
		<content:encoded><![CDATA[<p>hi<br />
there is an issue when tree ul element is inside some another list. In this case first checkbox is always checked.<br />
To fix this I had to add extra &#8221; &gt; ul&#8221; in jQuery selector for both cases when defaults.checkParents is true.</p>
<p><code><br />
// Check parents if necessary<br />
            if (defaults.checkParents) {<br />
                $("input:checked").parents("ul &gt; li").find("input[type='checkbox']:first").attr('checked', true);<br />
            }<br />
</code></p>
<p>I&#8217;m sure it may be done smarter way, but I&#8217;m not very good in js and jQuery.<br />
Btw: Thanks for this nice ale lightweight script! <img src='http://www.redcarrot.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sachin G</title>
		<link>http://www.redcarrot.co.uk/2009/11/11/collapsible-checkbox-tree-jquery-plugin/comment-page-1/#comment-79</link>
		<dc:creator>Sachin G</dc:creator>
		<pubDate>Tue, 10 Aug 2010 07:18:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.redcarrot.co.uk/?p=222#comment-79</guid>
		<description>Hi, nice work.

Can I add this checkbox tree to drupal content type.</description>
		<content:encoded><![CDATA[<p>Hi, nice work.</p>
<p>Can I add this checkbox tree to drupal content type.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Wallace</title>
		<link>http://www.redcarrot.co.uk/2009/11/11/collapsible-checkbox-tree-jquery-plugin/comment-page-1/#comment-78</link>
		<dc:creator>Sean Wallace</dc:creator>
		<pubDate>Mon, 09 Aug 2010 17:13:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.redcarrot.co.uk/?p=222#comment-78</guid>
		<description>Safique:

I added this to my version. You can see the &lt;a href=&quot;http://github.com/antihero/Collapsible-Checkbox-Tree-jQuery-Plugin/commit/7620ac6670d0ba919a848ac1ea4d2c16734de85c&quot; rel=&quot;nofollow&quot;&gt;code changes&lt;/a&gt; I made at github.

Sean</description>
		<content:encoded><![CDATA[<p>Safique:</p>
<p>I added this to my version. You can see the <a href="http://github.com/antihero/Collapsible-Checkbox-Tree-jQuery-Plugin/commit/7620ac6670d0ba919a848ac1ea4d2c16734de85c" rel="nofollow">code changes</a> I made at github.</p>
<p>Sean</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Safique Ahmed Faruque</title>
		<link>http://www.redcarrot.co.uk/2009/11/11/collapsible-checkbox-tree-jquery-plugin/comment-page-1/#comment-77</link>
		<dc:creator>Safique Ahmed Faruque</dc:creator>
		<pubDate>Thu, 05 Aug 2010 10:06:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.redcarrot.co.uk/?p=222#comment-77</guid>
		<description>How to hide or remove the button Expand All,Collapse All,Default?</description>
		<content:encoded><![CDATA[<p>How to hide or remove the button Expand All,Collapse All,Default?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Wallace</title>
		<link>http://www.redcarrot.co.uk/2009/11/11/collapsible-checkbox-tree-jquery-plugin/comment-page-1/#comment-76</link>
		<dc:creator>Sean Wallace</dc:creator>
		<pubDate>Mon, 02 Aug 2010 23:17:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.redcarrot.co.uk/?p=222#comment-76</guid>
		<description>Thanks for making this!

I tweaked the code slightly so that a shift-click would select children.

I created a &lt;a href=&quot;http://github.com/antihero/Collapsible-Checkbox-Tree-jQuery-Plugin&quot; rel=&quot;nofollow&quot;&gt;github repository&lt;/a&gt; with my changes. Feel free to fork and make suggestions there.</description>
		<content:encoded><![CDATA[<p>Thanks for making this!</p>
<p>I tweaked the code slightly so that a shift-click would select children.</p>
<p>I created a <a href="http://github.com/antihero/Collapsible-Checkbox-Tree-jQuery-Plugin" rel="nofollow">github repository</a> with my changes. Feel free to fork and make suggestions there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Konrad</title>
		<link>http://www.redcarrot.co.uk/2009/11/11/collapsible-checkbox-tree-jquery-plugin/comment-page-1/#comment-74</link>
		<dc:creator>Konrad</dc:creator>
		<pubDate>Wed, 30 Jun 2010 07:33:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.redcarrot.co.uk/?p=222#comment-74</guid>
		<description>Just noticed it doesn&#039;t work properly, if you have nested uls. Needs to be amended a bit. Sorry for that.
One needs to check the tree further up in this case. I will write the necessary code and post it here.</description>
		<content:encoded><![CDATA[<p>Just noticed it doesn&#8217;t work properly, if you have nested uls. Needs to be amended a bit. Sorry for that.<br />
One needs to check the tree further up in this case. I will write the necessary code and post it here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Konrad</title>
		<link>http://www.redcarrot.co.uk/2009/11/11/collapsible-checkbox-tree-jquery-plugin/comment-page-1/#comment-73</link>
		<dc:creator>Konrad</dc:creator>
		<pubDate>Tue, 29 Jun 2010 13:54:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.redcarrot.co.uk/?p=222#comment-73</guid>
		<description>A little contribution.

If you want parent nodes to be unchecked when all their children are, find this code:

&lt;code&gt;if (defaults.uncheckChildren) {
$(this).parent(&quot;li&quot;).find(&quot;input[type=&#039;checkbox&#039;]&quot;).attr(&#039;checked&#039;, false);
// Hide all children
$(&quot;ul&quot;, $(this).parent(&quot;li&quot;)).addClass(&#039;hide&#039;);
// Update the tree
$(&quot;span.expanded&quot;, $(this).parent(&quot;li&quot;)).removeClass(&quot;expanded&quot;).addClass(&quot;collapsed&quot;).html(&#039;+&#039;);
}&lt;/code&gt;

and add this just after it:

&lt;code&gt;if (defaults.uncheckParent) {
// Check if all the children of this item parent are unchecked...
if ( $(this).parent(&quot;li&quot;).parent(&quot;ul&quot;).find(&quot;li&quot;).find(&quot;input[type=&#039;checkbox&#039;]:checked&quot;).attr(&#039;checked&#039;)!=true ){
//...and uncheck parent if so
$(this).parent(&quot;li&quot;).parent(&quot;ul&quot;).parent(&quot;li&quot;).find(&quot;input[type=&#039;checkbox&#039;]&quot;).attr(&#039;checked&#039;, false );
}
}&lt;/code&gt;

You obviously have to add &lt;code&gt;uncheckParent : true,&lt;/code&gt; within defaults array. That&#039;s it.</description>
		<content:encoded><![CDATA[<p>A little contribution.</p>
<p>If you want parent nodes to be unchecked when all their children are, find this code:</p>
<p><code>if (defaults.uncheckChildren) {<br />
$(this).parent("li").find("input[type='checkbox']").attr('checked', false);<br />
// Hide all children<br />
$("ul", $(this).parent("li")).addClass('hide');<br />
// Update the tree<br />
$("span.expanded", $(this).parent("li")).removeClass("expanded").addClass("collapsed").html('+');<br />
}</code></p>
<p>and add this just after it:</p>
<p><code>if (defaults.uncheckParent) {<br />
// Check if all the children of this item parent are unchecked...<br />
if ( $(this).parent("li").parent("ul").find("li").find("input[type='checkbox']:checked").attr('checked')!=true ){<br />
//...and uncheck parent if so<br />
$(this).parent("li").parent("ul").parent("li").find("input[type='checkbox']").attr('checked', false );<br />
}<br />
}</code></p>
<p>You obviously have to add <code>uncheckParent : true,</code> within defaults array. That&#8217;s it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henrik W.</title>
		<link>http://www.redcarrot.co.uk/2009/11/11/collapsible-checkbox-tree-jquery-plugin/comment-page-1/#comment-71</link>
		<dc:creator>Henrik W.</dc:creator>
		<pubDate>Thu, 27 May 2010 14:48:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.redcarrot.co.uk/?p=222#comment-71</guid>
		<description>Sweet! 
This works super and fits right into my project! 
For some reason it renders the 3 buttons twice and I get doubles of the plus signs... I&#039;m sure I will sort it out though.</description>
		<content:encoded><![CDATA[<p>Sweet!<br />
This works super and fits right into my project!<br />
For some reason it renders the 3 buttons twice and I get doubles of the plus signs&#8230; I&#8217;m sure I will sort it out though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hyun-min Park</title>
		<link>http://www.redcarrot.co.uk/2009/11/11/collapsible-checkbox-tree-jquery-plugin/comment-page-1/#comment-68</link>
		<dc:creator>Hyun-min Park</dc:creator>
		<pubDate>Thu, 06 May 2010 04:51:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.redcarrot.co.uk/?p=222#comment-68</guid>
		<description>Thank you very much!!!!^_^</description>
		<content:encoded><![CDATA[<p>Thank you very much!!!!^_^</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Garcia</title>
		<link>http://www.redcarrot.co.uk/2009/11/11/collapsible-checkbox-tree-jquery-plugin/comment-page-1/#comment-57</link>
		<dc:creator>Tony Garcia</dc:creator>
		<pubDate>Fri, 05 Feb 2010 23:42:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.redcarrot.co.uk/?p=222#comment-57</guid>
		<description>This is really great and will be perfect for my current project. Many thanks!</description>
		<content:encoded><![CDATA[<p>This is really great and will be perfect for my current project. Many thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
