Enable/disable select control
Description
The following code shows how to enable/disable select control.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.9.1.js'></script>
<script type="text/javascript"
src="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.js"></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.css">
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){<!-- ww w . j ava 2s . c o m-->
$("select.one, select.two").selectmenu();
$("select.two").first().selectmenu("disable");
$("select.one").on("change", function(){
$("select.two").selectmenu("enable");
});
$("body").trigger("create");
});//]]>
</script>
</head>
<body>
<select class="one" data-mini="true" placeholder="Select a thing">
<option>One</option>
<option>Two</option>
<option>Three</option>
<option>Four</option>
</select>
<select class="two" data-mini="true" placeholder="Select a thing">
<option>Five</option>
<option>Six</option>
<option>Seven</option>
<option>Eight</option>
</select>
</body>
</html>