i searched lots of pages but could not get this simple question answered:
How can i handle a click on a listview item?
I have this listview:
- <ul id="menu" data-role="listview">
- <li><a href="#">link1</a></li>
- <li><a href="#">link2</a></li>
- <li><a href="#">link3</a></li>
- <li><a href="#">link4</a></li>
- <li><a href="#">link5</a></li>
- </ul>
tried this function to handle my click:
- $("#menu").click(function () {
- alert("click");
- });
my test-alert is not showing when clicking on any of that listview items. i also tested to set an id on the listview-item itself, same problem.
How should i handle onclick-event on a listview?
Any help is welcome.
Thanks
Michael