Tuesday, November 8, 2011

checkbox act like a radio button code:

jQuery:
jQuery('.chck').click(function(){
jQuery('.chck:checked').not(this).removeAttr('checked');
});

html:
<input class="chck" type="checkbox" name="chckBox"/> Mr.
<input class="chck" type="checkbox" name="chckBox"/> Mrs.
<input class="chck" type="checkbox" name="chckBox"/> Ms.
 

No comments:

Post a Comment