Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering jQuery Mobile

You're reading from   Mastering jQuery Mobile Design and develop cutting-edge mobile web applications using jQuery Mobile to work across a number of platforms

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher
ISBN-13 9781783559084
Length 262 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. Getting Started FREE CHAPTER 2. Tools and Testing 3. Mobile Design 4. Call to Action – Our Main Project 5. Navigation 6. Controls and Widgets 7. Working with Data 8. Finishing Touches 9. The Next Level 10. Mobile Best Practices and Efficiency Index

Downloading jQuery Mobile

Now we finally get to the meat and potatoes of what this book is about: jQuery Mobile. First thing we need to do is download the framework to use it in our projects. You have two ways of doing this. You can download a prebuilt ZIP file containing the latest stable release and everything you will need to use jQuery Mobile. The second option is that you can build a package that contains only the pieces you need, including earlier versions or unstable branches.

In this book, we will be using the complete package. There are couple reasons for this. First of all, we will be using and looking at so many different aspects of the framework that it would take a lot of space here for us to tell you which pieces to select in the builder. More importantly, as noted on the jQuery Mobile website, the builder is currently in alpha and is not recommended for production environments. Yes, we realize that we are not in a production environment here, but we don't want to try to master a framework by using code that could be unstable. We believe that's enough babbling, let's start downloading!

Go to http://jquerymobile.com. On the top right- hand side of the page, you will see the links to download the latest stable version (which at the time of writing this book is 1.4.5) and a link to the download builder. Click on the link for the latest stable. After the ZIP file is downloaded, go ahead and open it up and you should see the following:

Downloading jQuery Mobile

That's quite daunting, isn't it! No worries at all though; we will only be referencing a few of the files here, but let's talk about the overall contents of the ZIP file so that you will have a better understanding of what you just downloaded:

  • demos: We highly recommend that you look at and play around with the contents of this folder. You will find numerous examples here of the different elements of jQuery Mobile. Go now, spend some time with it and then come back—we'll wait.
  • images: This directory contains all of the icons that jQuery Mobile uses throughout the framework. You won't have to reference these directly, rather jQuery Mobile does so through CSS and its core JavaScript files.
  • *.css files: These are several style sheets that make up the overall jQuery Mobile framework. They control the preceding icons, the theme (more on that later), structure, and more.
  • jquery.mobile-1.4.5.css: This is the main and most important CSS file of the download and the one that you will reference and use in your applications.
  • jquery.mobile-1.4.5.js: This is the core JavaScript of the framework.

    Note

    You may have noticed that there are two versions of each file. One that has .min appended to the filename and one that does not. Those with .min are compressed minified files. This means they do not have any white spaces, new line characters, and comments in them. They are the absolute smallest in size that they can be and are hard to read as they do not have any formatting. Uncompressed files, or those without .min, contain comments, spacing, and more things that make them easier to read.

    As a rule of thumb, you should develop with the uncompressed files; that way, if you have any questions or need to see how something works, you can easily read the file. When you deploy the application, use the .min files so that the application size is smaller.

    A smaller web application will load faster, uses less bandwidth, and any little bit helps in a time where we have metered bandwidth on mobile devices. Google checks for the page load time as part of SEO. Faster loading JavaScript and CSS files will help you score brownie points and hence minified (.min) files should be preferred in the production environment.

You have been reading a chapter from
Mastering jQuery Mobile
Published in: Jul 2015
Publisher:
ISBN-13: 9781783559084
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image