bootstrap4-toggle
bootstrap4-toggle copied to clipboard
Toggle doesn't work on bootstrap 4 modal
Should I add something to a modal php page when I add a toggle into the page? It didn't show the toggle properly until I added the CSS and script CDN. However, The toggle doesn't slide left or right.
same issue.
toggle wont render in modal
The toggle won't show up if used in a modal.
Any updates on this issue?
same issue.
Similar when used in tabs. It is rendered and working, but its width is super small. Most likely because it is not visible on first load. I fixed it by initializing it by code, as soon as it is visible. In my case, when user clicks on tab header:
$('tabs-selector').tabs({
activate: function (event, ui) {
if (ui.newPanel.is('#tabContainingToggle')) {
$('#myToggle').bootstrapToggle({
on: 'On',
off: 'Off',
...
});
}
}
});
Maybe my solution is transferable to modals.