Friday, December 5, 2014

How to checkbox value assign in Phonegap using Jquery

I want to assign the default value true in checkbox using jquery. I tried some of the way to assign using like javascript

document.getElementById("checkbox-1").value()=true;


and

$("#checkbox-1").checked(true);
$("#checkbox-1").attr("checked","checked");


the checkbox value i does not assign the value.

Finally i tried this I fixed. Its working

 $("#checkbox-1").attr("checked",true).checkbox("refresh");

No comments:

Post a Comment