Simple jQuery problem <p>This one should be easy</p> <p>I've got this HTML</p> <pre><code>&lt;table class="PageNumbers"&gt; &lt;tr&gt; &lt;td colspan="3"&gt;text3 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2"&gt;text &lt;/td&gt; &lt;td&gt;text2 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;moretext &lt;/td&gt; &lt;td&gt;moretext2 &lt;/td&gt; &lt;td&gt;moretext3 &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>I need to change the colspan of the first rows first column to one</p> <p>This is what i've got</p> <pre><code>$('.PageNumbers tr:first td:first').attr('colspan') = '1' </code></pre> <p>Doesn't seem to work though</p> <p>Any ideas?</p> <p>Thanks</p>