Back to Curriculum

jQuery Mobile

📚 Lesson 12 of 15 ⏱️ 40 min

jQuery Mobile

40 min

jQuery Mobile is a touch-optimized web framework for smartphones and tablets.

It provides a unified user interface system across all popular mobile device platforms.

jQuery Mobile is built on jQuery and jQuery UI and provides mobile-specific features.

Exercise

Create a simple jQuery Mobile page with navigation.

<!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" id="home">
    <div data-role="header">
      <h1>My Mobile App</h1>
    </div>
    <div data-role="main" class="ui-content">
      <h2>Welcome!</h2>
      <a href="#page2" class="ui-btn">Go to Page 2</a>
    </div>
  </div>
</body>
</html>

Code Editor

Output