Skip to content

plugin: buttonMarkup

louy edited this page Dec 19, 2010 · 3 revisions

Description

Turn a link into a button that has rounded corners and an icon.

Usage:

$(selector).buttonMarkup(options);

Data roles

Roles that can be added to an anchor before turning it into a button:

  • data-icon: accepts a string for various icon classes. Specify the portion after the ui-icon- in the class name. For example, 'arrow-l', 'arrow-d'
  • data-theme: accepts a letter to override the button's theme (a,b,c). If unspecified, theme will inherit from closest ui-bar parent, or fallback to "c"
  • data-iconPos: 'left', 'right', 'top', 'bottom', 'notext' (for buttons that should be icon-only)

Plugin options:

  • corners: true (round corners or not)
  • shadow: true (shadow or not)
  • iconshadow: true (should icons have an inner shadow?)
  • wrapperEls: 'span' (div is useful when calling buttonMarkup on an element containing block-level elements, like an LI in a listview)
Clone this wiki locally