how to access the class attribute of a div tag inside a td using jquery
<p>I have rendered the below table</p>

<pre><code>   &lt;table id="layout" width="100%" border="0" cellspacing="6" cellpadding="0"&gt;
        &lt;tr&gt;
           &lt;td&gt;
             &lt;div style="position: static;" class="type_normal type_common" title="33"&gt;33&lt;/div&gt;
           &lt;/td&gt;
           &lt;td&gt;
             &lt;div style="position: static;" class="type_selected ticket_type_common" title="34"&gt;33&lt;/div&gt;
           &lt;/td&gt;
        &lt;/tr&gt;
   &lt;/table&gt;
</code></pre>

<p>My requirement is on clicking a particular cell, I want the value and the class of the div tag.</p>

<pre><code>        $("#layout").delegate('tr td','click',function(){
            var seat_selected=$(this).text();
            seat_selected=$(this).html();
            }
        });
</code></pre>

<p>Using $(this).text gives me the number 33.
Using $(this).html() gives the entire section inside td(I get the entire div).
But I want only the class of the div tag.
What is the procedure to get the class names of the div tag to a variable.</p>

<p>My requirement is to check for a particular class in the div tag and change the div tag to another class.
For example if the cell that I clicked had div tag with class (type_normal type_common) , I want  to change the class of the div tag to (type_selected type_common)</p>

<p>Please advice.</p>
