<input type="checkbox" name="one" id="one"/> <label for="one">I have read and I accept the terms and conditions</label> <br /> <div class="col-sm-12"> <button type="submit" name="btnnext" id="btnnext" class="btn btn-primary btn-primary">Next<span class="glyphicon glyphicon-chevron-right"></span></button> </div> <script type="text/javascript"> var checkBoxes = $('one'); checkBoxes.change(function () { $('#btnnext').prop('disabled', checkBoxes.filter(':checked').length < 1); }); checkBoxes.change(); </script>
$('one')
$('#one')
id
body.onload(function() { ... checkBoxes.change();});
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)