Get the currently selected Button.


jQuery the jQuery object representing the currently selected button.

Example - get the index of the currently selected Button

<div data-role="view">
  <ul id="buttongroup" data-role="buttongroup" data-select="onSelect">
    <li>Option 1</li>
    <li>Option 2</li>
    <li>Option 3</li>

var app = new;

function onSelect(e) {
    var index = this.current().index();
/* The result can be observed in the DevTools(F12) console of the browser. */
In this article
Not finding the help you need? Improve this article