javascript - Bootstrap animations not working -


i'm quite new angular/bootstrap , downloaded template i'm trying modify , add features go learning.

i'm trying have collapsible sub-menu such

<ul class="nav nav-sidebar">     <li ng-class="{active: $state.includes('overview')}"><a ui-sref="overview">overview <span class="sr-only">(current)</span></a></li>     <li><a href="" data-toggle="collapse" data-target="#products">products</a></li> <!-- click on should expand div below... -->      <div class="collapse" id="products">         <ul>              <div ng-repeat="itemtype in itemtypes">                 <li><a href="" class="list-group-item">{{itemtype.description}}</a></li>              </div>         </ul>     </div> </ul> 

my attempt this example.

instead of button, want animation triggered click on anchor.

i read version of bootstrap had problems animation upgraded bootstrap#3.3.6

any ideas ?

thanks.

edit: not working mean, nothing happening. can use ng-show directive, there's no smooth animation.

as docs says,

you can use a link href attribute, or button data-target attribute. in both cases, data-toggle="collapse" required.

change anchor tag use href attribute instead of data-target.

<a href="#products" data-toggle="collapse">products</a> 

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>  <ul class="nav nav-sidebar">      <li ng-class="{active: $state.includes('overview')}"><a ui-sref="overview">overview <span class="sr-only">(current)</span></a></li>      <li><a href="#products" data-toggle="collapse">products</a></li> <!-- click on should expand div below... -->       <div class="collapse" id="products">          <ul>               <div ng-repeat="itemtype in itemtypes">                  <li><a href="" class="list-group-item">{{itemtype.description}}</a></li>               </div>          </ul>      </div>  </ul>


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -