Posted By

igor822 on 11/19/10


Tagged

jquery checkbox radio behavior


Versions (?)

Checkbox with radio behavior with jQuery


 / Published in: jQuery
 

  1. $(function() {
  2. $("input:checkbox").click(function() {
  3. if($(this).attr("checked")) {
  4. valorChecado = $(this).val();
  5. $("input:checkbox").each(function() {
  6. if($(this).val() != valorChecado && $(this).attr("checked")) {
  7. $(this).removeAttr("checked");
  8. }
  9. });
  10. }
  11. });
  12. });

Report this snippet  

You need to login to post a comment.