You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a similar issue where I have bootstrap tabs (11 of them) with a various amount of toggles on each tab. When the page loads the first tab appears fine and the style of the div that is generate sets the correct width. However if you change tabs, or inspect in the code, all the toggles on the other tabs have are rendered as <div class="toggle btn btn-success" data-toggle="toggle" role="button" style="width: 0px; height: 0px;">
@steven
Did you tried to use the $(document).ready(function() { }
mentioned with my post? Just looked into my code again, there I added
// The text length of data-on/data-off on the 'modal' cannot be
// calculated as long as it is not open, so it is set to 'width:0px';
// When the modal is opened, the 'style' is calculated:
$('#mutedOp')[0].children[1].setAttribute('style',"width:80px")
(also to remind myself about the issue ;) )
.. but still waiting for another, better solution ...
bootstrap-toggle "toggleDevice" generates
width:0px
only.It's not scaling correctly for the text length of data-on/data-off.
The code used:
This generates:
To get it better using ... this hack could do it
... but should be better?!
Version used: Toggle.VERSION = '2.2.0'
The text was updated successfully, but these errors were encountered: