2

I need to call the jqLite slideToggle function inside a AngularJS directive to animate the collapsing of each content-box.

I want to slideDown/slideUp the following div..

<div class="ibox-content" ng-show="!collapse">
  Content
</div>

..by clicking on one of these icons

<a class="collapse-link" >
 <i data-ng-click="toggleCollapse();" data-ng-show="collapse" class="fa fa-chevron-down"></i>
 <i data-ng-click="toggleCollapse();" data-ng-show="!collapse" class="fa fa-chevron-up"></i>
</a>

Here is a working Plunker without without the desired slideToggle animation: Click!.

Any ideas? Hope you can help..

Codehan25
  • 2,704
  • 10
  • 47
  • 94
  • 1
    You should add reference to the full jQuery library or use angular's animate http://stackoverflow.com/questions/22659729/modifying-dom-slidedown-slideup-with-angularjs-and-jquery – codtex Dec 27 '16 at 11:10
  • 1
    check this out https://plnkr.co/edit/zoURPxatyamMoW4D8Itc?p=preview this is a very very basic code, you can work around it – codtex Dec 27 '16 at 11:13
  • These are both very nice solutions. This time I will use the second one. Thank you :) – Codehan25 Dec 27 '16 at 12:17

0 Answers0