0

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 ?'); 
});

1 Answer 1

2
$("#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?)

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for answer...Concerning '.on', i'm not really familiar wit that ) But I will look. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.