How do display a collapsible tree in AngularJS + Bootstrap

In followed example I used: bootstrap AngularJS recursive ng-include or (see second example) recursive directives jQuery (will try to avoid in the future) Demo 1 (ng-include) Plunker From this model: $scope.displayTree = [{ “name”: “Root”, “type_name”: “Node”, “show”: true, “nodes”: [{ “name”: “Loose”, “group_name”: “Node-1”, “show”: true, “nodes”: [{ “name”: “Node-1-1”, “device_name”: “Node-1-1”, “show”: true, … Read more

Bootstrap: Collapse other sections when one is expanded

Using data-parent, first solution is to stick to the example selector architecture <div id=”myGroup”> <button class=”btn dropdown” data-toggle=”collapse” data-target=”#keys” data-parent=”#myGroup”><i class=”icon-chevron-right”></i> Keys <span class=”badge badge-info pull-right”>X</span></button> <button class=”btn dropdown” data-toggle=”collapse” data-target=”#attrs” data-parent=”#myGroup”><i class=”icon-chevron-right”></i> Attributes</button> <button class=”btn dropdown” data-toggle=”collapse” data-target=”#edit” data-parent=”#myGroup”><i class=”icon-chevron-right”></i> Edit Details</button> <div class=”accordion-group”> <div class=”collapse indent” id=”keys”> keys </div> <div class=”collapse indent” id=”attrs”> … Read more

Bootstrap 3 – disable navbar collapse

After close examining, not 300k lines but there are around 3-4 CSS properties that you need to override: .navbar-collapse.collapse { display: block!important; } .navbar-nav>li, .navbar-nav { float: left !important; } .navbar-nav.navbar-right:last-child { margin-right: -15px !important; } .navbar-right { float: right!important; } And with this your menu won’t collapse. DEMO (jsfiddle) EXPLANATION The four CSS properties … Read more

How do I uncollapse a margin? [duplicate]

well you need something in between to “break” the collapsing. my first thought was to use a div with display:none set in between, but that doesn’t seem to work. so I tried: <div style=”overflow: hidden; height: 0px; width: 0px;”>.</div> which seems to do the job nicely (at least in firefox, don’t have internet explorer installed … Read more

Change bootstrap navbar collapse breakpoint without using LESS

2018 UPDATE Bootstrap 4 Changing the navbar breakpoint is easier in Bootstrap 4 using the navbar-expand-* classes: <nav class=”navbar fixed-top navbar-expand-sm”>..</nav> navbar-expand-sm = mobile menu on xs screens <576px navbar-expand-md = mobile menu on sm screens <768px navbar-expand-lg = mobile menu on md screens <992px navbar-expand-xl = mobile menu on lg screens <1200px navbar-expand = … Read more

How to disable margin-collapsing?

There are two main types of margin collapse: Collapsing margins between adjacent elements Collapsing margins between parent and child elements Using a padding or border will prevent collapse only in the latter case. Also, any value of overflow different from its default (visible) applied to the parent will prevent collapse. Thus, both overflow: auto and … Read more