javascript - How to start animation of collapsed box (adminlte) immediately? -


i'm using collapsed box adminlte template. have problem first time when want show box (after clicking on -), animation doesn't work , content showed immediately. start working after clicking. can me initialize animation immediately?...

jsfiddle

<div class="box collapsed-box">   <div class="box-header with-border">     <h3 class="box-title">default box example</h3>     <div class="box-tools pull-right">       <!-- buttons, labels, , many other things can placed here! -->       <!-- here label example -->      <button type="button" class="btn btn-box-tool" data-widget="collapse">                     <i class="fa fa-minus"></i>      </button>     </div>     <!-- /.box-tools -->   </div>   <!-- /.box-header -->   <div class="box-body">   <h3>the body of box</h3>   <h3>the body of box</h3>   <h3>the body of box</h3>   <h3>the body of box</h3>   <h3>the body of box</h3>   <h3>the body of box</h3>   <h3>the body of box</h3>   </div>   <!-- /.box-body -->   <div class="box-footer">     footer of box   </div>   <!-- box-footer --> </div> <!-- /.box --> 

here go solution https://jsfiddle.net/ocoj8g35/4/

<link href="https://cdn.rawgit.com/almasaeed2010/adminlte/6157c7bc/dist/css/adminlte.min.css" rel="stylesheet"/>  <link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"/>  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>  <script src="https://cdn.rawgit.com/almasaeed2010/adminlte/6157c7bc/dist/js/adminlte.min.js"></script>  <div class="box collapsed-box">    <div class="box-header with-border">      <h3 class="box-title">default box example</h3>      <div class="box-tools pull-right">        <!-- buttons, labels, , many other things can placed here! -->        <!-- here label example -->       <button type="button" class="btn btn-box-tool" data-widget="collapse">                      <i class="fa fa-plus"></i>       </button>      </div>      <!-- /.box-tools -->    </div>    <!-- /.box-header -->    <div class="box-body" style="display:none;">    <h3>the body of box</h3>    <h3>the body of box</h3>    <h3>the body of box</h3>    <h3>the body of box</h3>    <h3>the body of box</h3>    <h3>the body of box</h3>    <h3>the body of box</h3>    </div>    <!-- /.box-body -->    <div class="box-footer" style="display:none;">      footer of box    </div>    <!-- box-footer -->  </div>  <!-- /.box -->

you missing display:none; in .box-body & .box-footer.

hope you.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -