Disable text in page init
Description
The following code shows how to disable text in page init.
Example
<!-- w ww. j a v a2s . c o m-->
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-2.0.2.js'></script>
<script type="text/javascript"
src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.js"></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.css">
<script type='text/javascript'>//<![CDATA[
$(document).on('pageinit', '#age', function (e) {
$('#ageNext').addClass('ui-disabled');
});
//]]>
</script>
</head>
<body>
<!-- Start of first page -->
<div data-role="page" id="age">
<div data-role="header">
<h1>Age?</h1>
</div>
<!-- /header -->
<div data-role="content">
<input id="ageInput" name="age" type="number" max="30" min="1" />
<a data-role="button" href="#location" id="ageNext">Next</a>
</div>
<!-- /content -->
<div data-role="footer">
<h4>Page Footer</h4>
</div>
<!-- /footer -->
</div>
<!-- /page -->
</body>
</html>