I have check box in the form with the following values:
<input type="checkbox" name="role" value="Admin1" />Admin1<br />
<input type="checkbox" name="role" value="Admin2" />Admin2<br />
<input type="checkbox" name="role" value="Admin3" />Admin3<br />
<input type="checkbox" name="role" value="Admin4" />Admin4<br />
I have a Roles List that is coming from the server side with the values :
Roles
{
Admin1
Admin4
}
Now based on the Roles value the options Admin1 and Admin4 will be checked in the check box. How can I do this using jQuery?