title: jquery mobile only one popup for many list items
body: <p>I have the following code for a jquery mobile list view with popup of options for each list item.</p>
  
  <p>Would like to have only one popup where the id of the link is passed to it instead of a new popuo for each list item. How can one pass the id into the popup?</p>
  
  <pre><code>    &lt;div data-role="page"&gt;
          &lt;div data-role="header"&gt;
               &lt;h1&gt;My page&lt;/h1&gt; 
          &lt;/div&gt;
          &lt;div data-role="content"&gt;
              &lt;ul data-role="listview"&gt;
                  &lt;li&gt;&lt;a href="#thepopup" id="5" data-rel="popup" data-position-to="window" data-transition="pop"&gt;&lt;h2&gt;Item 1&lt;/h2&gt;&lt;/a&gt;
  
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a href="#purchase" id="6" data-rel="popup" data-position-to="window" data-transition="pop"&gt;&lt;h2&gt;Item 2&lt;/h2&gt;&lt;/a&gt;
              &lt;p&gt;Item 2 description&lt;/p&gt;&lt;/a&gt;
  
                  &lt;/li&gt;
              &lt;/ul&gt;
              &lt;div data-role="popup" id="thepopup"&gt;
                  &lt;ul data-role="listview"&gt;
                      &lt;li&gt;&lt;a href="view.php?id=5"&gt;View details&lt;/a&gt;&lt;/li&gt; 
  HERE THE "5" SHOULD BE THE ID OF THE ITEM CLICKED ABOVE
                      &lt;li&gt;&lt;a href="edit.php?id=5"&gt;Edit&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a data-rel="back" href="#"&gt;Cancel&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>