Print

Setting radios buttons to false with jQuery

First we need to set radio buttons to unchecked. Then we convert the class rules on two elements. I tried using the button refresh method. That did not work. The below example is for a page transition with jQuery mobile, and for a regular page you could use $(document).ready $(document).on("pageshow","#one",function(){ $("input[type='radio']").attr('checked',''); $(".ui-radio-on").each(function(){ $(this).addClass("ui-radio-off"); $(this).removeClass("ui-radio-on"); }); $(".ui-icon-radio-on").each(function(){ $(this).addClass("ui-icon-radio-off"); $(this).removeClass("ui-icon-radio-on"); }); });
  • 0 Users Found This Useful
Was this answer helpful?