userimage

how to set a checkbox checked in jquery

i want to do check of a checkbox based on the json data getting from server and using jquery i want to set the checkbox as checked. What is the best way to do check the checkbox sing jquery.
userimage

You can use below way

$('#id').prop('checked', true);

Hope this will help you.

Answer is