$('table').attr("cellspacing", 0);
Changes the tablecacing table attribute to 0, regardless of whether it was previously defined or not.
HTML launch:
<table> ... </table>
<table cellspacing="5" cellpadding="5"> ... </table>
HTML Result:
<table cellspacing="0"> ... </table>
<table cellspacing="0" cellpadding="5"> ... </table>
source
share