Your example is great, this is poster example how dynamic jQuery/jQuery Mobile content should be created.
Change only three things:
- At the end you should append popup to the needed jQuery Mobile page because it is not going to work outside a data-role="page" div.
- Change the function bind to the function on. On is much faster method of event binding. And it is here to replace bind and delegate.
- Check if your code is going to work in web kit browsers like Chrome. Chrome has a nasty bug which prevents programmatic popup open in every page event except pageshow. More info about this problem: https://stackoverflow.com/a/15830353/1848600