how to get ul class name while clicking li - jquery
<p>How to get ul class name while clicking li - jquery</p>

<pre><code>&lt;div class="div-class-parent"&gt;
    &lt;div class="div-class"&gt;test&lt;/div&gt;
    &lt;ul class="tabs"&gt;
        &lt;li class="node-205"&gt;&lt;/li&gt;
        &lt;li class="node-150"&gt;&lt;/li&gt;
        &lt;li class="node-160"&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p><strong>EDITED:</strong></p>

<p><strong>For example when i clicking the "li" I need to get the class name of ul and class name of the div.</strong></p>

<p>That is i need the class name "tabs" and "div-class".</p>

<p>When i use the below code i get the parent class name of div that is i get "div-class-parent".</p>

<pre><code>$('li').click(function() {
   alert($(this).closest('div').attr('class'));
});
</code></pre>

<p>How can this be done using jquery.</p>

<p>thanks in advance...</p>
