Place popup template inside content

Description

The following code shows how to place popup template inside content.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.css">
<script type='text/javascript'
  src="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.js"></script>
</head><!--  w  w w. j  av a 2s  .c om-->
<body>
  <div data-role="page" id="page2">
    <div data-role="header" data-theme="e">
      <h3>Page 2</h3>
      <a data-role="button" data-direction="reverse" data-rel="back"
        href="#page2" data-icon="arrow-l" data-iconpos="left"> Back </a>
    </div>
    <div data-role="content">
      <a href="#popupBasic" data-rel="popup" data-role="button">Open
        Popup</a>
      <div data-role="popup" id="popupBasic">
        <p>This is a completely basic popup, no options set.
        <p>
      </div>
      <div data-role="footer" data-position="fixed" data-theme="e">
        <h4>footer</h4>
      </div>
    </div>
</body>
</html>

Click to view the demo





















Home »
  jQuery Mobile »
    Example »




Button
Button Event
Button Icon
Button Text
Checkbox
Collapsible
Date
Dialog
Event
Footer
Form
Header
Icon
Input
Layout
Listview
Listview Divider
Listview Item
Loader
mobile_settings
Navbar
Page
Page Event
Popup
Radio
Select
Slider
Switch
Textarea
Theme