Installation of jQuery Mobile
- Previous Page Introduction to jQuery Mobile
- Next Page jQuery Mobile Page
Add jQuery Mobile to your web page
There are several ways to get started using jQuery Mobile on your website. You can:
- Reference jQuery Mobile from CDN (recommended)
- Download jQuery Mobile library from jQuerymobile.com
Reference jQuery Mobile from CDN
Tip:CDN (Content Delivery Network) is used to distribute common files over the web, thereby speeding up the download speed for users.
Like jQuery, you do not need to install any programs on your computer; you just need to reference the following stylesheets and JavaScript libraries directly in your HTML page so that jQuery Mobile can work:
jQuery Mobile CDN:
<head> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"> <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script> </head>
Download jQuery Mobile
If you want to store jQuery Mobile on the server, you can download it from jQuerymobile.com Download the file.
<head> <link rel=stylesheet href=jquery.mobile-1.3.2.css> <script src=jquery.js></script> <script src=jquery.mobile-1.3.2.js></script> </head>
Tip:Please place the downloaded file in the folder you wish to use.
Tip:Are you wondering why there is no type="text/javascript" attribute in the <script> tag?
This attribute is not required in HTML5. JavaScript is the default scripting language for HTML5 and all modern browsers!
- Previous Page Introduction to jQuery Mobile
- Next Page jQuery Mobile Page