Click to hide a button
Description
The following code shows how to click to hide a button.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>//<![CDATA[
window.onload=function(){<!--from w w w. j ava 2 s . co m-->
$("a.button").click(function(){
$("a.button").hide().eq(1).show();
});
}//]]>
</script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>Test Page</h1>
<a class="button ui-btn-left" data-icon="delete">Delete</a>
<a class="button ui-btn-left" data-icon="check" style="display: none">Done</a>
</div>
<div data-role="content">
<p>Click on Delete to get Done button</p>
</div>
</div>
</body>
</html>