Validation on radio button in jquery easyui

3.2k Views Asked by At

How to apply validation on radio button in jquery easyui? Or is there a way to check a radio button by default in jquery easyui?

<input type="radio" name="degree_status" value="Completed" class="easyui-validatebox" checked="checked" /> Completed
<input type="radio" name="degree_status" class="easyui-validatebox" value="In Progress" /> In Progress
1

There are 1 best solutions below

0
On

You can pre-select a radio button as

$(document).ready(function() {
    var $radios = $('input:radio[name=degree_status]');
    $radios.filter('[value=Completed]').prop('checked', true);
});