title: How to get the index of the element selected in ListView JQUERYMOBILE
body: <p>I have created a dynamic <code>listview</code> with a link with <code>id="a"</code>.</p>
  
  <pre><code>&lt;ul id="accpmenu" data-role="listview" &gt;
  &lt;/ul&gt;
  
  $("#accpmenu").append('&lt;li&gt;&lt;a href='+ "#" + ' id="a" "&gt;'+ this.textContent +'&lt;/a&gt;  &lt;/li&gt;');
  </code></pre>
  
  <p>Now i want to identify the index of the element that I have clicked from this <code>listview</code>.</p>
  
  <pre><code>$("#a").live("click",function(e)
  {
      //What should i write here to get the selected index?.
  }
  </code></pre>
  
  <p>I want the index number based on this I need to load the dynamic XML.</p>
  
  <p>Please help me in resolving this.</p>
  
  <p>Thanks
  Shyam</p>