Ever wanted Radio-button group which could be deselected once you click on any of the choice from given radio button group?
Then here is my simple jQuery plugin which you can use to make all your radio-buttons in the form behave like checkbox. Here by checkbox I mean to give Click to select and click-again to de-select kind of functionality.
How to use?
$(document).ready(function(){ $(":radio").behaveLikeCheckbox(); });
For more details checkout live demo or goto jQuery plugin repository.
Update: Radio-buttons with Checkbox behavior - a jQuery Plugin 1.2.5
#1 by Beauregardao on March 23, 2008 - 7:59 am
Quote
omg.. good work, guy
#2 by Chad on December 19, 2008 - 5:24 am
Quote
Works well. Thanks for putting that together!
#3 by glig on June 23, 2009 - 1:01 am
Quote
Nice!!
#4 by ferdinol on January 6, 2010 - 5:18 am
Quote
Thanks for putting
#5 by Shawn on July 1, 2010 - 10:36 am
Quote
Piece of shit…try clicking on the text of radio button and it highlights but does not enable
#6 by sud on September 24, 2010 - 4:40 am
Quote
this is great…i've been looking for such a behavior for quite some time and finally found it here!
#7 by RuiG on July 4, 2011 - 7:42 pm
Quote
Excellent, but how can i bind this to a class or use only on a set of options and not with all radio buttons on a page?
#8 by Dharmavirsinh Jhala on July 4, 2011 - 11:40 pm
Quote
Hi RuiG,
That's pretty simple, you can apply some class to your radio-button set and then filter them like following:
$(".some-class").behaveLikeCheckbox();