Page 26 - JqueryMobile_Manual
P. 26
26
<div data-role="footer">
<h1>Footer Text</h1>
</div>
</div>
</body>
</html>
Positioning popups
tryjqmob_popup_position.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>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>Welcome To My Homepage</h1>
</div>
<div data-role="main" class="ui-content">
<a href="#myPopup1" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all" data-position-
to="window">Position popup to window</a>
<a href="#myPopup2" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all" data-position-
to="#demo">Position popup to element with id="demo"</a>
<a href="#myPopup3" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all" data-position-
to="origin">Position popup to origin (default)</a>
<div data-role="popup" id="myPopup1" class="ui-content">
<p>I will appear centered within the window.</p>
</div>
<div data-role="popup" id="myPopup2" class="ui-content">
<p>I will appear directly over the element with id="demo".</p>
</div>
<div data-role="popup" id="myPopup3" class="ui-content">
<p>I will appear directly over the clicked link.</p>
</div>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<p>This is also a paragraph.</p>
<p>This is also a paragraph. I have a child element: This is a <span id="demo"
style="color:red;">span</span> element with id="demo", inside the paragraph.</p>
</div>
<div data-role="footer">
<h1>Footer Text</h1>
</div>
</div>
</body>
</html>