<?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 Plugin &#8211; Radio button with Checkbox Behavior &#8211; Updated</title>
	<atom:link href="http://blogs.digitss.com/javascript/jquery-plugin-radio-button-with-checkbox-behavior-updated/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.digitss.com/javascript/jquery-plugin-radio-button-with-checkbox-behavior-updated/</link>
	<description>DiGiTSS Team&#039;s Programming experience with PHP, MySQL, Ajax, Javascript, jQuery, C# and Microsoft technologies</description>
	<lastBuildDate>Wed, 21 Jul 2010 16:48:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: the666bbq</title>
		<link>http://blogs.digitss.com/javascript/jquery-plugin-radio-button-with-checkbox-behavior-updated/comment-page-1/#comment-8342</link>
		<dc:creator>the666bbq</dc:creator>
		<pubDate>Tue, 03 Feb 2009 12:06:12 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/uncategorized/jquery-plugin-radio-button-with-checkbox-behavior-updated/#comment-8342</guid>
		<description>for those using PHP, the filter on name might be to strict if you use array names (PHP uses them to combine some elements) and the PHP framework I am using (QCodo) has them on name too. Square brackets in name and/or id might not be W3C compliant but since PHP uses them I extended the name filter expression to :

var prefix = expression;
expression += &quot;[@name=&quot; + name + &quot;]&quot;;
expression += &quot;, &quot; + prefix + &quot;[@name^=&quot; + name + &quot;\[]&quot;;

so basicly filter on elements with name attribute equal to the chosen name, and also apply to those elements starting with the chosen name[

now you have both name=LIST and name=LIST[ in your filtering results</description>
		<content:encoded><![CDATA[<p>for those using PHP, the filter on name might be to strict if you use array names (PHP uses them to combine some elements) and the PHP framework I am using (QCodo) has them on name too. Square brackets in name and/or id might not be W3C compliant but since PHP uses them I extended the name filter expression to :</p>
<p>var prefix = expression;<br />
expression += &#8220;[@name=" + name + "]&#8220;;<br />
expression += &#8220;, &#8221; + prefix + &#8220;[@name^=" + name + "\[]&#8220;;</p>
<p>so basicly filter on elements with name attribute equal to the chosen name, and also apply to those elements starting with the chosen name[</p>
<p>now you have both name=LIST and name=LIST[ in your filtering results</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: the666bbq</title>
		<link>http://blogs.digitss.com/javascript/jquery-plugin-radio-button-with-checkbox-behavior-updated/comment-page-1/#comment-8258</link>
		<dc:creator>the666bbq</dc:creator>
		<pubDate>Fri, 30 Jan 2009 15:24:21 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/uncategorized/jquery-plugin-radio-button-with-checkbox-behavior-updated/#comment-8258</guid>
		<description>Hi, thanks for this plugin,
I modified it somewhat so that could have multiple selected checkboxes behaving like a radio (once you check at least one, you cannot uncheck) so that you have all 4 circumstances &quot;checked&quot;

normal radio : zero or one, once selected, always one
normal checkboxes : zero or multiple
radioCheckboxGroup : the real zero or one
radioMultipleCheckboxGroup : zero or multiple, once selected at least one.

to do so I added radioMultipleCheckboxGroup as a copy of radioMultipleCheckboxGroup and changed the x.click to :


			var boo = false;
			for (var inti=0;inti&lt;x.length;inti++)
			{
				if (x[inti].checked==true)boo=true;
			}
			if (!boo)
			{
				return false;
			}</description>
		<content:encoded><![CDATA[<p>Hi, thanks for this plugin,<br />
I modified it somewhat so that could have multiple selected checkboxes behaving like a radio (once you check at least one, you cannot uncheck) so that you have all 4 circumstances &#8220;checked&#8221;</p>
<p>normal radio : zero or one, once selected, always one<br />
normal checkboxes : zero or multiple<br />
radioCheckboxGroup : the real zero or one<br />
radioMultipleCheckboxGroup : zero or multiple, once selected at least one.</p>
<p>to do so I added radioMultipleCheckboxGroup as a copy of radioMultipleCheckboxGroup and changed the x.click to :</p>
<p>			var boo = false;<br />
			for (var inti=0;inti&lt;x.length;inti++)<br />
			{<br />
				if (x[inti].checked==true)boo=true;<br />
			}<br />
			if (!boo)<br />
			{<br />
				return false;<br />
			}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dragos</title>
		<link>http://blogs.digitss.com/javascript/jquery-plugin-radio-button-with-checkbox-behavior-updated/comment-page-1/#comment-3904</link>
		<dc:creator>Dragos</dc:creator>
		<pubDate>Thu, 02 Oct 2008 11:41:28 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/uncategorized/jquery-plugin-radio-button-with-checkbox-behavior-updated/#comment-3904</guid>
		<description>Better try this as the above I think have some problems (anywai in FF I saw it, try use mouse/keyboard to see what I mean) :)

Here it is:

$.fn.extend({
	triState:function(){
		return this.each(function(){
			$(this).data(&#039;status&#039;, $(this).attr(&#039;checked&#039;));
			$(this).focus(function(){ $(this).data(&#039;status&#039;, $(this).attr(&#039;checked&#039;)); });
			$(this).blur(function(){ $(this).data(&#039;status&#039;, $(this).attr(&#039;checked&#039;)); });
			$(this).mousedown(function(){ $(this).data(&#039;status&#039;, $(this).attr(&#039;checked&#039;)); });
			$(this).keydown(function(){ $(this).data(&#039;status&#039;, $(this).attr(&#039;checked&#039;)); });
			$(this).click(function(){
				if ($(this).data(&#039;status&#039;))
					$(this).attr(&#039;checked&#039;, false);
				$(this).data(&#039;status&#039;, $(this).attr(&#039;checked&#039;));
			});
		});
	}	
});

It&#039;s working good on (tested) FF, IE(7 anyway, still may be a little problem there), Opera, Safari (for Win).

P.S. Use as  (where &quot;radioid&quot; is the ID used by radio buttons...)</description>
		<content:encoded><![CDATA[<p>Better try this as the above I think have some problems (anywai in FF I saw it, try use mouse/keyboard to see what I mean) <img src='http://blogs.digitss.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here it is:</p>
<p>$.fn.extend({<br />
	triState:function(){<br />
		return this.each(function(){<br />
			$(this).data(&#8216;status&#8217;, $(this).attr(&#8216;checked&#8217;));<br />
			$(this).focus(function(){ $(this).data(&#8216;status&#8217;, $(this).attr(&#8216;checked&#8217;)); });<br />
			$(this).blur(function(){ $(this).data(&#8216;status&#8217;, $(this).attr(&#8216;checked&#8217;)); });<br />
			$(this).mousedown(function(){ $(this).data(&#8216;status&#8217;, $(this).attr(&#8216;checked&#8217;)); });<br />
			$(this).keydown(function(){ $(this).data(&#8216;status&#8217;, $(this).attr(&#8216;checked&#8217;)); });<br />
			$(this).click(function(){<br />
				if ($(this).data(&#8216;status&#8217;))<br />
					$(this).attr(&#8216;checked&#8217;, false);<br />
				$(this).data(&#8216;status&#8217;, $(this).attr(&#8216;checked&#8217;));<br />
			});<br />
		});<br />
	}<br />
});</p>
<p>It&#8217;s working good on (tested) FF, IE(7 anyway, still may be a little problem there), Opera, Safari (for Win).</p>
<p>P.S. Use as  (where &#8220;radioid&#8221; is the ID used by radio buttons&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Web 2.0 Announcer</title>
		<link>http://blogs.digitss.com/javascript/jquery-plugin-radio-button-with-checkbox-behavior-updated/comment-page-1/#comment-8</link>
		<dc:creator>Web 2.0 Announcer</dc:creator>
		<pubDate>Sun, 09 Mar 2008 16:19:37 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/uncategorized/jquery-plugin-radio-button-with-checkbox-behavior-updated/#comment-8</guid>
		<description>&lt;strong&gt;jQuery Plugin - Radio button with Checkbox Behavior - Updated...&lt;/strong&gt;

[...]Ever wanted Radio-buttons having Checkbox behavior..?&#xD;
I mean Radio-buttons which you can click and CHECK and once again click and UNCHECK.&#xD;
Here is a jQuery plug-in which will let you do with just single line of code.[...]...</description>
		<content:encoded><![CDATA[<p><strong>jQuery Plugin &#8211; Radio button with Checkbox Behavior &#8211; Updated&#8230;</strong></p>
<p>[...]Ever wanted Radio-buttons having Checkbox behavior..?&amp;#xD;<br />
I mean Radio-buttons which you can click and CHECK and once again click and UNCHECK.&amp;#xD;<br />
Here is a jQuery plug-in which will let you do with just single line of code.[...]&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
