Reputation: 9234
I have list view, each list item has split button 'delete'. How to determine which item was clicked ?
Here is my example: http://jsfiddle.net/gDea8/83/
$("#listview a.ui-li-link-alt").live("click", function(e){
alert('which item ? 1,2,3 or 4 ?');
});
Upvotes: 0
Views: 454
Reputation: 206008
$("#listview a.ui-li-link-alt").live("click", function(e){
alert($(this).parent().index() +1);
});
(Any chance to update your jQuery version and use the .on()
method?)
Upvotes: 2