jquery select li element in hierarchical menu
<p>I need to be able to get the text from the certain <code>li</code> when it is clicked on, code is below:</p>

<pre><code>&lt;div&gt;
&lt;ul&gt;
    &lt;li&gt;list item 1&lt;/li&gt;
    &lt;li&gt;list item 2&lt;/li&gt;
    &lt;li&gt;
      &lt;ul&gt;
       &lt;li&gt;list item 3&lt;/li&gt;
       &lt;li&gt;list item 4&lt;/li&gt;
       &lt;li&gt;list item 5&lt;/li&gt;
     &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;list item 6&lt;/li&gt;
    &lt;li&gt;
       &lt;ul&gt;
       &lt;li&gt;list item 7&lt;/li&gt;
       &lt;li&gt;list item 8&lt;/li&gt;
       &lt;li&gt;list item 9t&lt;/li&gt;
     &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>In this case, I need to get the "<em>list item 5</em>" by its index. </p>

<p>Edited:</p>

<p>Basically, when the <code>&lt;li&gt;list item 5&lt;/li&gt;</code> is clicked i want to get this particallar text or value, when something else is clicked - do nothing. Note that although the menu is hierarchical, 5th element means flat 5th element. Carefully check the texts of the <code>li</code> items to understand.</p>
