click

Fires when the user taps the button.

Event Data

e.target jQuery

The clicked DOM element

e.button jQuery

The button DOM element

Example - get the item to which DetailButton belongs to

<div data-role="view">
  <ul data-role="listview">
    <li>Item 1<a data-role="detailbutton" data-style="rowinsert" data-click="onClick"></a></li>
    <li>Item 2<a data-role="detailbutton" data-style="rowinsert" data-click="onClick"></a></li>
    <li>Item 3<a data-role="detailbutton" data-style="rowinsert" data-click="onClick"></a></li>
  </ul>
</div>

<script>
var app = new kendo.mobile.Application();

function onClick(e) {
var item = e.button.closest("li"); //get the item
item.css("background", "yellow"); //change its background
}
</script>
In this article
Not finding the help you need? Improve this article