0

I have simple group of buttons which I need to reset:

<div class="btn-group" data-toggle="buttons">
    <label class="btn btn-defaul">
        <input type="radio" name="flip" autocomplete="off" checked="checked"> Front
    </label>
    <label class="btn btn-default active">
        <input type="radio" name="flip" autocomplete="off" checked="checked"> Back
    </label>
</div>

I'm trying it like jQuery('.btn-group').button('reset') but it not working.

user1692333
  • 2,461
  • 5
  • 32
  • 64

1 Answers1

1
$('input[name="flip"]').prop('checked', false);

or if you are using an older version of jQuery:

$('input[name="flip"]').attr('checked', false);

EDIT

Check out @Puya Sarmidani comment. That's a great link.

Damon
  • 4,151
  • 13
  • 52
  • 108