combine checkbox with jquery mobile listview

后端 未结 3 1032
孤独总比滥情好
孤独总比滥情好 2020-12-21 15:07

I\'d like to use a jqm styled checkbox in my listview cells. I\'ve made a composite picture to show the desired end result:

http://tinyurl.com/ctvko27

Whenev

3条回答
  •  孤城傲影
    2020-12-21 15:35

    Just tried to use Gajotre's solution with the latest versions of jquery (1.9.1) + jquerymobile (1.3.2) but unfortunately it didn't work.

    You have to change the

    $(this).find('input[type="checkbox"]').attr('checked' , false);
    $(this).find('input[type="checkbox"]').attr('checked' , true);
    

    to

    $(this).find('input[type="checkbox"]').prop('checked' , false);
    $(this).find('input[type="checkbox"]').prop('checked' , true);
    

    otherwise you'll be able to change the checkbox "checked" value only once.

提交回复
热议问题