Fires when the user taps the button.

Example - prevent navigation

<div id="foo" data-role="view">
  <a data-role="button" href="#bar">Foo</a>

<div id="bar" data-role="view">
  <a data-role="backbutton" data-click="onClick">Back</a>

var app = new;
function onClick(e) {
  e.preventDefault(); //prevent navigating back

Event Data jQuery

The clicked DOM element

e.button jQuery

The button DOM element

In this article
Not finding the help you need? Improve this article