Show hide button
Description
The following code shows how to show hide button.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.5.2.js'></script>
<script type='text/javascript'
src="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css">
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){<!--from w w w . j a v a 2 s . com-->
$('#submit_btn').button();
$('#hide_btn').toggle(function(){
$(this).prev('span').find('span.ui-btn-text').text("Show Submit Button"); //Change the text of the button
$('#submit_btn').closest('.ui-btn').hide();
},
function(){
$(this).prev('span').find('span.ui-btn-text').text("Hide Submit Button"); //Change the text of the button
$('#submit_btn').closest('.ui-btn').show();
});
});//]]>
</script>
</head>
<body>
<input type="button" id="hide_btn" value="Hide Submit Button"
data-inline="true" />
<input type="submit" id="submit_btn" value="Submit" data-theme="e"
data-inline="true" />
</body>
</html>