Change margin value on table with value from a variable with jQuery?
<p>I select some tables using this:</p>

<pre><code>$('.StatusDateTable').each(function() {
var statusLight = $(this).find(".StatusLight").attr("src");
statusLight = statusLight.substring(33).slice(0,-9);

if (statusLight == "Blue") {
    var columns = Math.abs((start - end)-1);
    var columnWidth = 40;
    var marginRight = Math.abs(columnWidth * columns);
</code></pre>

<p>Now I want to set margin-right="theValueOfmarginRightHere" on the current table, is this possible?</p>

<p>I tried something like:</p>

<pre><code>$(this).attr('margin-right=" + marginRight + "');
</code></pre>

<p>but obviously it doesn't work.</p>

<p>Thanks in advance.</p>
