使用jquery在html中加载页面后动态检查复选框

I am coding a page that contains checkboxes. the user check some of them and their values are stored in some table. Now if the user again visit that page then previously stored values are read for the table. Now I want to check those boxes whose values are stored and the remaining remains unchecked. Can anybody help me ? thanks in advance..

$(document).ready(function () {
    //Read table

    //Check appropriate checkboxed
    $('#Your CheckBox ID ').attr('checked', 'checked');
});
$(document).ready(function () {
    //Read table

    //Check appropriate checkboxed
    $('#cb2').attr('checked', 'checked');
});

It's pretty easy using .prop() or .attr()

$('.some-selector-for-radio-or-checkbox').prop('checked', true);