Closed suryadatta closed 5 years ago
I found the solution over at stackoverflow. https://stackoverflow.com/questions/45879986/adding-bootstrap-component-to-an-html-element-on-runtime-doesnt-render-properly
Just had to add the bootstrap jquery on DOM reload.
$("[data-toggle='toggle']").bootstrapToggle();
I am working in .NET Core and whenever i refresh my ViewComponent the Toggle button gets hidden. This is the generated HTML:
After ViewComponent Refresh:
<input type="checkbox" id="check1" class="addInSwitched" checked="checked" data-toggle="toggle" data-size="mini" data-style="ios">
The rest of the generated Html of bootstrap disappears. Please help me find why this is happening.