title: How to get the selected ID of a UL / LI Box by Clicking on a Button - Jquery
body: <p>I'm trying to get the Value of a Listbox made of li via button Click. I searched the web but the most solutions are with the onClick button on the listbox itself. 
  I tried something like this.</p>
  
  <p>Listbox:</p>
  
  <pre><code>echo("&lt;/head&gt;&lt;body&gt;&lt;ul id='selectable'&gt;");
  
  while($satz != null)
  {
    echo "&lt;li class='ui-widget-content' id='userid' value='$satz[ID]'&gt;$satz[username]&lt;/li&gt;";
    $satz=mysql_fetch_assoc($cursor);
  }
  echo("&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;");
  </code></pre>
  
  <p>JQuery:</p>
  
  <pre><code>$(document).ready(function()
  {
  $("#del").click(function()
  {
  var id = document.getElementById('selectable li').value;
  alert(id);
  </code></pre>
  
  <p>But ID is undefined, what to do? Thanks.</p>