If you are trying to add an element to the DOM, any style assigned in the STYLE block or in the attached CSS file that matches a valid style selector should automatically affect that element. You do not need to reload the attached stylesheet.
For example (demo):
.someclass {
background-color: #f00;
padding: 5px;
}
<table id="myid">
<tbody>
<tr>
<td>Adjacent to added TD</td>
</tr>
</tbody>
</table>
$('#myid tbody tr').append('<td class="someclass">stuff...</td>');
http://jsfiddle.net/5WLnX/
source
share