jQuery Mobile Get Started

Adding jQuery Mobile to Your Web Pages

There are two different ways to add jQuery Mobile to your site. You can:

  • Link to a jQuery Mobile library put away at a CDN (recommended)
  • Link to a jQuery Mobile library put away at your computer

Link to jQuery Mobile From a CDN

As with jQuery center, there is nothing to introduce on your PC; you just incorporate the accompanying template (.css) and JavaScript libraries (.js) straightforwardly into your HTML page, to get jQuery Mobile to work:

jQuery Mobile CDN:


<!- - Include meta tag to guarantee appropriate rendering and contact zooming - >
<meta name="viewport" content="width=device-width, beginning scale=1">

<!- - Include jQuery Mobile templates - >
<link rel="stylesheet" href="http://code.jquery.com/portable/1.4.5/jquery.mobile-1.4.5.min.css">

<!- - Include the jQuery library - >
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>

<!- - Include the jQuery Mobile library - >
<script src="http://code.jquery.com/portable/1.4.5/jquery.mobile-1.4.5.min.js"></script>


Link to jQuery Mobile Stored at Your Computer

If you need to have the jQuery Mobile library yourself, you should initially download it from jQuerymobile.com.

Then add the accompanying code to your page:

<meta name="viewport" content="width=device-width, starting scale=1">
<link rel="stylesheet" href="jquery.mobile-1.4.5.css">
<script src="jquery.js"></script>
<script src="jquery.mobile-1.4.5.js"></script>

Tip: Place the downloaded documents in a similar registry as the pages where you wish to utilize it.