Thursday, 21 December 2017

Jquery Most used Scenarios: check at least one checkbox validation in jquery

Jquery Most used Scenarios

ContentMiddleAd


check at least one checkbox validation in jquery


ContentMiddleAd

$("#YourbuttonId").click(function(){
    if($('#YourTableId').find('input[type=checkbox]:checked').length == 0)
    {
        alert('Please select atleast one checkbox');
    }
});
Update:
i saw your code and seems like you are using jquery validation plugin in that case this post will help you
and try giving your checkbox same name which exist in a group

No comments:

Post a Comment