stupid newbie question: bind taphold to a dynamically created element
I'm getting a list of items back via json and displaying those items just fine... none are static, all or displayed dynamically.
What I want to do now is bind a taphold event to popup a delete menu and a swipeleft/swiperight event to load a new page and display the entire item (instead of just its header).
The items/headers are inside <li> and those are nested inside
<div data-role="collapsible"> elements.
I've read a dozen articles and there seems to be all sorts of issues witht this: all sorts of events bubbling up the dom etc, bind doesn't work with dynamic elements etc. etc. and the code to fix all these issues seems like cutting off the leg to fix a hang nail.
What's the right way to implement a .bind("taphold", popupDelete(event) ); so that I know what element was clicked and not get all the issues that seems to come with this event???