Tables: selected rows and loop through column JQuery&JavaScript
<p>I have two questions :)</p>

<ol>
<li><p>Im using Jquery to select table rows and checkbox in the first column, how can I make 2 and 7 columns not clickable. I mean if you click 7 column's cell, it will not select checkbox and will not add 'selected' class.</p>

<pre><code>$('#tableID tbody tr')
    .filter(':has(:checkbox:checked)')
    .addClass('selected')
    .end()
    .click(function (event) {
        $(this).toggleClass('selected');
        if (event.target.type !== 'checkbox') {
            $(':checkbox', this).attr('checked', function () {
                return !this.checked;
            });
        }
    });
</code></pre></li>
<li><p>I'm using JavaScript to add all one column values, the script is working fine when the table doesn't have merged cells. How to make it work with merged cells.</p></li>
</ol>

<pre><code>_________                             _________
|_|_|_|_|                             |   |_|_|
|_|_|_|_|    script working           |___|_|_|     script doesn't work
|_|_|_|_|                             |_|_|_|_|
|_|_|_|_|                             |___|_|_|</code></pre>

<pre><code>function count() {

    var i;
    var sum=0;
    var table = document.getElementById("tableID");
    for (i=1;i&lt;table.rows.length-1;i++) {
        sum += Number(table.rows[i].cells[3].innerHTML, 10);
    }
    document.getElementById('sum1').innerHTML = sum;
}
</code></pre>

<p>HTML code for the second part: <a href="http://jsfiddle.net/f4zH9/" rel="nofollow">http://jsfiddle.net/f4zH9/</a></p>

<p>Thanks</p>
