Buttons

We can use any a element to make links between pages or to link to external content. However, a typical a element is not rendered easily for touch devices. The element is typically inline, and the clickable area is only the text. That is not a good experience for the touch user. That is why jQuery Mobile provides buttons.

A button is a UI component that is, a larger clickable area with text and optionally an icon.

To make a button, use this code:

<a href="#contact" data-role="button">Contact us now!</a>

Button options

data-inline (boolean = false)

If set to true, this will make the button act like an inline button so the width is determined by the button's text. By default, this is null (false) so the button is full width, regardless of the feedback content.

Post A Comment

Anti-Spam Quiz: