Code Monkey home page Code Monkey logo

Comments (3)

StevenMapes avatar StevenMapes commented on September 28, 2024

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;">

from bootstrap-toggle.

neandr avatar neandr commented on September 28, 2024

@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 ...

from bootstrap-toggle.

StevenMapes avatar StevenMapes commented on September 28, 2024

Yeah I ended up fixing it by simply adding these CSS classes to set the height and width that I need

    .tab-pane .toggle, .modal .toggle{
        min-width: 75.1791px !important; height: 35.597px !important;
    }

from bootstrap-toggle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.