keep different checkbox checked jquery mobile

keep different checkbox checked jquery mobile

Hi,

I'm using jquery mobile on phonegap and as the title says I want to keep checkboxes checked with the "refresh" method. I can achieve this with radiobox but not with checkboxes.

How I do this with radiobox is for exp.:

  1. if(user.gender !==null) { $('#toughest_challenge_id_' + user.gender).attr('checked',true); genderBox.checkboxradio("refresh"); } 

where user.gender is the function containing the fields of my database. But how I can reach the same with checkboxes?

p.s. the objective is to memorize the selected checkboxes by the user.
p.p.s. I've read many posts and made some tests but with no results so far!!

thanks in advance for your help!