JavaScript Bootstrap collapse.in requiring two clicks to hide sidebar

My first time posting on here so hopefully I do this correctly!

Here's sample code:

    $(document).ready(function() {
      $('[data-toggle=offcanvas]').click(function() {
        $('.row-offcanvas').toggleClass('active');
      });
      $('#stacked-menu li a ').click(function() {
        $(this).next('ul').slideToggle('500');
        $(this).find('i').toggleClass('glyphicon-arrow-left glyphicon-arrow-down')
      });
    });
#sidebar {
  width: inherit;
  min-width: 220px;
  max-width: 220px;
  background-color: #F5F5F5;
  float: left;
  height: 100%;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}
i {
  color: black;
}
.glyphicon-arrow-down {
  float: right;
  font-size: 8px;
}
.glyphicon-arrow-left {
  float: right;
  font-size: 8px;
}
.nav-container {
  background-color: #F5F5F5;
  font-weight: bold;
  margin: 0 0 0 0;
}
.nav-sub-container {
  background-color: #F5F5F5;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
}
ul.nav-stacked ul.nav-stacked > li > a {
  padding-left: 25px;
}
.padRight {
  padding-right: 40px;
}
ol {
  margin-left: -40px;
}
a {
  color: black !important;
}
a:hover {
  color: #720000 !important;
}
.size {
  font-size: 12px !important;
  margin-left: 10px;
}
<link 
    target='_blank' href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" 
        rel="stylesheet" />
<script
    src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.js">
</script>
<script 
    src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js">  
</script>

<ul class="nav nav-pills nav-stacked" id="stacked-menu">
    <li>
        <a class="nav-container"
            data-target="#h1"
                data-toggle="collapse"
                    data-parent="#stacked-menu">
                        Home
                        <i class="glyphicon glyphicon-arrow-down"></i>
        </a>
    </li>
    <ul class="nav nav-pills nav-stacked collapse.in" data-toggle="false" id="h1">
        <li data-toggle="collapse" data-parent="#hs1" target='_blank' href="#hs1">
            <a class="nav-sub-container">
                Menu 1
                <i class="glyphicon glyphicon-arrow-left padRight"></i>
            </a>
        </li>
        <ul class="nav nav-pills nav-stacked collapse size" id="hs1">
            <li><a target='_blank' href="#ss1.1">Sub-section 1</a></li>
            <li><a target='_blank' href="#ss1.2">Sub-section 2</a></li>
        </ul>
        <li data-toggle="collapse" data-parent="#hs1" target='_blank' href="#hs2">
            <a class="nav-sub-container">
                Menu 2
                <i class="glyphicon glyphicon-arrow-left padRight"></i>
            </a>
        </li>
        <ul class="nav nav-pills nav-stacked collapse size" id="hs2">
            <li><a target='_blank' href="#ss2.1">Sub-section 1</a></li>
            <li><a target='_blank' href="#ss2.2">Sub-section 2</a></li>
        </ul>
        <li data-toggle="collapse" data-parent="#hs2" target='_blank' href="#hs3">
            <a class="nav-sub-container">
                Menu 3
                <i class="glyphicon glyphicon-arrow-left padRight"></i>
            </a>
        </li>
        <ul class="nav nav-pills nav-stacked collapse size" id="hs3">
            <li><a target='_blank' href="#ss3.1">Sub-section 1</a></li>
            <li><a target='_blank' href="#ss3.2">Sub-section 2</a></li>
            <li><a target='_blank' href="#ss3.3">Sub-section 3</a></li>
        </ul>
    </ul>
</ul>
Answer:1

OK, so I'm trying to take an image on my machine and manipulate it using a canvas and some JS... However, I keep getting the error: "Image from origin 'file://' has been blocked from loading by ...

OK, so I'm trying to take an image on my machine and manipulate it using a canvas and some JS... However, I keep getting the error: "Image from origin 'file://' has been blocked from loading by ...

I am trying to convert textbox value on onblur event to a $ currency using jquery.formatCurrency-1.4.0.js and my javascript function looks as follows : $(document).ready(function() { $('.currency'...

I am trying to convert textbox value on onblur event to a $ currency using jquery.formatCurrency-1.4.0.js and my javascript function looks as follows : $(document).ready(function() { $('.currency'...

  1. formatcurrency function in vb.net
  2. formatcurrency function access
  3. formatcurrency function r
  4. formatcurrency function in ssrs
  5. formatcurrency function in vbscript
  6. format currency function in sql server
  7. angular formatcurrency function example
  8. access formatcurrency function example
  9. angular formatcurrency function
  10. vba format currency function
  11. ms access formatcurrency function

I am trying to implement a function f so that when called like the following: (((f 1) 2) 3) () It returns the sum of 1, 2, and 3, which is 6. Only when it's invoked with a Unit argument () that the ...

I am trying to implement a function f so that when called like the following: (((f 1) 2) 3) () It returns the sum of 1, 2, and 3, which is 6. Only when it's invoked with a Unit argument () that the ...

  1. function with invocation
  2. function invocation in javascript
  3. function invocation in c
  4. function invocation in python
  5. function invocation in js
  6. invoke function with parameters unity
  7. invoke function with parameters c#
  8. invoke function with parameters
  9. invoke function with parameters powershell
  10. function invoke in javascript
  11. function invoke in c++
  12. function invoke in php
  13. function invoke on java
  14. invoke function in unity
  15. invoke function in power bi
  16. invoke function in python
  17. invoke function in shell script
  18. invoke function in powershell script
  19. invoke function in kotlin
  20. invoke function by name javascript

function makeLine(length) { var line = ""; for (var i = 1; i <= length; i++) { for (var j = 1; j <= i; j++) { line += "*"; } } return line + "\n"; } console....

function makeLine(length) { var line = ""; for (var i = 1; i <= length; i++) { for (var j = 1; j <= i; j++) { line += "*"; } } return line + "\n"; } console....

  1. print triangle using recursion
  2. print triangle using python
  3. print triangle using while loop
  4. print triangle using for loop in c++
  5. print triangle using for loop in java
  6. print triangle using c
  7. print triangle using java
  8. print triangle using for loop
  9. print pascal's triangle using java program
  10. print number triangle using python
  11. print triangle in python using while loop
  12. print triangle in python using for loop
  13. print triangle in java using while loop
  14. print triangle in python using one for loop
  15. print triangle in c++ using while loop
  16. program to print triangle using numbers
  17. c program to print triangle using *
  18. c program to print triangle using for loop
  19. print numbers triangle shape using c
  20. java program to print triangle using for loop