Book Image

jQuery Mobile First Look

Book Image

jQuery Mobile First Look

Overview of this book

Table of Contents (17 chapters)
jQuery Mobile First Look
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Working with methods and utilities


In addition to the set of properties we are able to configure as default options, jQuery mobile lets us make use of a set of methods which are of great aid in dealing with some common issues we may encounter during the creation of our web application.

These methods are all accessible through the $.mobile object (of which we will learn more as we go on) and can be called at any time in our script, depending on our needs.

Tip

The $.mobile.activePage property refers to the page currently displayed.

  • addResolutionBreakpoints (number|array values): Add width breakpoints to the min/max width classes that are added to the HTML element

  • The values argument can be either a number or an array of numbers

Note

jQuery Mobile has defined a set of classes that are applied to the top-level element and updated on window load or resize.

Breakpoints (that is, the widths at which the class is added) are set by default at the following widths: 320, 480, 768, 1024, and for each of these...