Page 123 - JqueryMobile_Manual
P. 123
123
.ui-body-f {
font-weight: bold;
color: white;
background-color: purple;
}
.ui-page-theme-f {
font-weight: bold;
background-color: green;
}
</style>
</head>
<body>
<div data-role="page" data-theme="f">
<div data-role="header" data-theme="f">
<h1>Header with "f" theme</h1>
</div>
<div data-role="main" class="ui-content ui-body-f">
<p>Content with the new "f" theme!</p>
</div>
</div>
</body>
</html>
Chapter 16
jQuery Mobile Events
Tap event
tryjqmob_events_tap.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<script>
$(document).on("pagecreate","#pageone",function(){
$("p").on("tap",function(){
$(this).hide();
});
});
</script>
</head>
<body>
<div data-role="page" id="pageone">
<div data-role="header">
<h1>The tap Event</h1>
</div>
<div data-role="main" class="ui-content">
<p>If you tap me, I will disappear.</p>
<p>Tap me away!</p>