Getting and setting check boxes in jQuery is a lot easier than setting radio buttons and we can thank the “prop” function for that.
Here is the HTML, notice each check box has its own Id, that is the key so the jQuery selector can get at the “checked” property:
Getting the value is a single line call and it can be stored in a boolean:
pillar_buy = $('#screen_pillar_buy').prop( "checked");
Setting is just as easy:
$('#screen_pillar_buy').prop( "checked", pillar_buy );