title: How to get id from li element?
body: <p>I'm trying to take the value of the.live() li element using jquery as the following code :</p>
  
  <pre><code>$("body").on("click", "#nav li:has(ul)", function (event) {
     if (this == event.target) {
        $(this).toggleClass('clicked').children('ul').slideToggle();
        $(this).find('li:has(ul)').removeClass('clicked').find("ul").slideUp();
        $(this).siblings().removeClass('clicked').find("ul").slideUp();
     }
  })
  
  $("#content").load("content.html");
  </code></pre>
  
  <p>and inside <code>content.html</code> I put some code like this:</p>
  
  <pre><code>   &lt;ul id="nav"&gt;
         &lt;li value='2012'&gt;2012
           &lt;ul&gt;
               &lt;li value='Geography'&gt;Geography&lt;/li&gt;
               &lt;li value='Topography'&gt;Topography&lt;/li&gt;
               &lt;li value='Geological'&gt;Geological&lt;/li&gt;
               &lt;li value='Seismology'&gt;Seismology&lt;/li&gt;
               &lt;li value='Volcanology'&gt;Volcanology&lt;/li&gt;
               &lt;li value='Oceanography'&gt;Oceanography&lt;/li&gt;
               &lt;li value='Hydrogeology'&gt;Hydrogeology&lt;/li&gt;
               &lt;li value='Meteorology'&gt;Meteorology&lt;/li&gt;
               &lt;li value='Demography'&gt;Demography&lt;/li&gt;
           &lt;/ul&gt;
         &lt;/li&gt;
     &lt;/ul&gt;
  </code></pre>
  
  <p>So, when I click in the li element, <code>alert($('li').attr('value')</code>,
  how to get its value?</p>