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

What do buttons look and feel like in jQuery mobile?


Each button we decide to create will be styled in the same way by the jQuery mobile framework, in order to improve the consistency of our web application.

But what exactly are buttons, and how do they look? First of all, we have a choice between link buttons and form buttons.

Link buttons are, actually, links which are styled as buttons. We can see an example of this type of button in almost all of our pages, in which the back button, placed on the top-left corner of the header bar, is a link to the previous page in the browsing history:

Note

For navigation purposes, you should use link buttons instead of regular buttons, which are best suited to submit form data because of the submit action they perform when clicked.

The jQuery Mobile framework automatically adds the necessary CSS classes to style the link as a button.

Here is an example of link buttons looking exactly like form buttons:

On the other hand, form buttons are "real" buttons, but...