Is it possible to force the CSS file to reload after a jquery event? i.e.
css file has in it:
.someclass{
font-size:2em;
font-family:courier;
etc...
}
Jquery event(s):
$('#myid').append('<td class="someclass">stuff...</td>
If you're trying to add an element to the DOM, any style designated in a STYLE block or in an attached CSS file that is matched by a valid stylesheet selector should automatically affect that element. You do not need to reload the attached stylesheet.
For instance (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>');
tdelement you're appending to have thesomeclassclass after you append it, it will. you don't need to reload your CSS file