bootstrap4-toggle icon indicating copy to clipboard operation
bootstrap4-toggle copied to clipboard

Toggle doesn't work on bootstrap 4 modal

Open hungpham-cb opened this issue 5 years ago • 4 comments

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.

hungpham-cb avatar Feb 07 '20 19:02 hungpham-cb

same issue.

toggle wont render in modal

kozfelipe avatar Nov 30 '20 19:11 kozfelipe

The toggle won't show up if used in a modal.

Any updates on this issue?

gu33mis avatar Jan 27 '21 09:01 gu33mis

same issue.

ghostfighter50 avatar Mar 18 '21 09:03 ghostfighter50

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.

p-tenz avatar Oct 26 '23 11:10 p-tenz