Jquery parse HTML Table
<p>I have the following table:</p>

<pre><code>&lt;table id="tableData" name="tableData"&gt;
    &lt;tr&gt;
        &lt;td class="tdvalue"&gt;&lt;a class="XXX"&gt;10&lt;/a&gt;&lt;/td&gt;
        &lt;td class="tdvalue"&gt;&lt;a class="YYY"&gt;4&lt;/a&gt;&lt;/td&gt;
        &lt;td class="tdvalue"&gt;&lt;a class="XXX"&gt;7&lt;/a&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>I need to get the td value which has hyperlink with class name in an array</p>

<p>The following code is not working </p>

<pre><code>var rows = [];
$("#tableData tr").each(function() {
    $tr = $(this);
    var row = [];
    $tr.find(".tdvalue").each(function(){
        row.push($(this).text());
    });
});
</code></pre>

<p>This gives the value of the text with in the td.
but I need to class name of XXX <code>&lt;a class="XXX"&gt;10&lt;/a&gt;</code></p>

<p>result would be:</p>

<pre><code>Array[3] 0:"XXX" 1:"YYY" 2:"XXX"
</code></pre>

<p>Please help anyone</p>