How Collect all the outside tag numbers
<p>I want to collect the numbers extracoronal
What is the correct way to do this</p>

<pre><code>&lt;body&gt;
&lt;div id="HQ"&gt;&lt;/div&gt;    

&lt;table class="table" border="2"&gt;
&lt;tr&gt;
&lt;td&gt;AAAA&lt;/td&gt;
&lt;td&gt;
&lt;span class="A"&gt;&lt;/span&gt;
"6"
&lt;span class="B"&gt;&lt;/span&gt;
"4"
&lt;span class="C"&gt;&lt;/span&gt;
"5"
&lt;span class="D"&gt;&lt;/span&gt;
"5"
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;table class="table" border="2"&gt;
&lt;tr&gt;
&lt;td&gt;AAAA&lt;/td&gt;
&lt;td&gt;
&lt;span class="A"&gt;&lt;/span&gt;
"9"
&lt;span class="B"&gt;&lt;/span&gt;
"4"
&lt;span class="C"&gt;&lt;/span&gt;
"2"
&lt;span class="D"&gt;&lt;/span&gt;
"2"
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;table class="table" border="2"&gt;
&lt;tr&gt;
&lt;td&gt;AAAA&lt;/td&gt;
&lt;td&gt;
&lt;span class="A"&gt;&lt;/span&gt;
"7"
&lt;span class="B"&gt;&lt;/span&gt;
"4"
&lt;span class="C"&gt;&lt;/span&gt;
"5"
&lt;span class="D"&gt;&lt;/span&gt;
"1"
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;/body&gt;
</code></pre>

<p>scirpt :</p>

<pre><code>&lt;script&gt;

$(function(){

var texts = $('td *').map(function() {
    if (this.nextSibling.nodeType == 3)
        return this.nextSibling.nodeValue;
});

var a = texts[0];
var b = texts[1];
var c = texts[2];
var d = texts[3];

A = Number(a)
B = Number(b)
C = Number(c)
D = Number(d)

$("#HQ").html(A);
});
&lt;/script&gt;
</code></pre>

<p>I want to collect the numbers
All of which are inside the table</p>

<p>I just want class="A"</p>

<pre><code>&lt;span class="A"&gt;&lt;/span&gt;
 "6"
</code></pre>

<p>6 + 7 + 9 = 22</p>

<p>Tried the code above, but did not succeed</p>

<p>But how??!!</p>
