Learn free online HTML5, javascript, and jquery Tutorials by Examples

Sunday, 21 December 2014

How to make checkboxes to act like radio button using jQuery ?

<input type="checkbox" value="Male">satish mallick<br/>
<input type="checkbox" value="male2">satish<br/>
<input type="checkbox" value="All">mallick<br/>

<script>
$("input:checkbox").click(function(e){
    $("input:checkbox").not(this).attr('checked', false);
});
</script>

No comments:

Post a Comment