Reputation: 3735
I have a single page application in jQuery Mobile 1.4.0, with 4 pages. At start I want some chckboxes to be disabled by default.
This works:
$("#page3 .ui-checkbox").prop("disabled", true);
$("#page3 .ui-checkbox").addClass("ui-disabled");
html
<div data-role="page" class="page3" id="page3" data-dom-cache="true">
document ready() isn't working... document on "pagecreate" works, but changes to page3 will be applied when navigating to page2....
Update I tried this... seems to work. Is this good/bad ?
$(function()
{
$(document).on("pagecreate", "#page3", function(e){
$("#page3 .ui-checkbox").prop("disabled", true);
$("#page3 .ui-checkbox").addClass("ui-disabled");
});
Upvotes: 1
Views: 52