I have thousands of bootstrap-switch as table row, like code below. It's very expensive too load and if I see on ChromeDevTool (performance) I can see: Warning Forced reflow is a likely performance bottleneck.
How can I make it faster? The time spent for rendering is too much and it breaks the page.
$("input[data-toggle='toggle']").bootstrapSwitch({
onSwitchChange:function(event, state) {
$(this).parents('form').trigger('change')
}
});
Table with +1.000 rows
<table>
<thead>...</thead>
<tbody>
<tr>
<td>
<form action="...:">
<input type="checkbox" data-toggle="toogle"/>
</form>
</td>
</tr>
</table>
