Latest web development tutorials

jQuery Mobile is installed

Adding jQuery Mobile on your web page

You can add the following ways jQuery Mobile to your page:

  • Loaded from the CDN jQuery Mobile (Recommended)
  • Download jQuery Mobile library from jQuerymobile.com

JQuery Mobile is loaded from the CDN

lamp CDN stands for Content Delivery Network, ie, content distribution networks. The basic idea is to have as much as possible to avoid bottlenecks and links may affect the data transmission speed and stability on the Internet that allows faster transmission of content, more stable. .

Using jQuery core, you do not need to install anything on your computer; you just need to load the following Cascading Style (.css) and JavaScript libraries (.js) will be able to use jQuery Mobile in your web page:

jQuery Mobile CDN:

<Head>

<-! Meta viewport use to ensure that pages free to zoom ->
<Meta name = "viewport" content = "width = device-width, initial-scale = 1">

<! - The introduction of jQuery Mobile Style ->
<Link rel = "stylesheet" href = "http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">

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

<! - The introduction of jQuery Mobile library ->
<Script src = "http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"> </ script>

</ Head>

try it"

Domestic users are recommended Baidu CDN:

jQuery Mobile CDN (Baidu):

<Head>

<-! Meta viewport use to ensure that pages free to zoom ->
<Meta name = "viewport" content = "width = device-width, initial-scale = 1">

<! - The introduction of jQuery Mobile Style ->
<Link rel = "stylesheet" href = "http://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.css">

<! - The introduction of the jQuery library ->
<Script src = "http://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"> </ script>

<! - The introduction of jQuery Mobile library ->
<Script src = "http://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.js"> </ script>

</ Head>

try it"

This tutorial reference library Baidu CDN repository.



Download jQuery Mobile

If you want to jQuery Mobile put in your host, you can from jQuerymobile.com download the file.

<head>
<meta name="viewport" content="width=device-width, initial-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>
</head>

Tip: Place the downloaded file at the same web directory.

lampDo you want to know why the <script> tag is not inserted type = "text / javascript"?

In HTML5 no longer needed the property. JavaScript HTML5 is the default scripting language in all modern browsers!