javascript - How to show and hide an element in my case? -


i trying show , hide element when user clicks ul element

i have like

<ul ng-click="expandmenu =!expandmenu"> //when clicks ul, wrapper shows  </ul>   <div id='wrapper' ng-show='expandmenu' ng-animate="{show:'animate-show', hide:'animate-hide'}">    //contents  </div> 

the element shows , hides expected when click ul want have smooth animation.

my css

.animate-show, .animate-hide {   -webkit-transition:all linear 1s;   -moz-transition:all linear 1s;   -ms-transition:all linear 1s;   -o-transition:all linear 1s;   transition:all linear 1s;  }  .animate-show {   opacity:0; }  .animate-show.animate-show-active {   opacity:1; }  .animate-hide {   opacity:1; } 

i found above answer google can't seem worked in case. can me out?

thanks

you don'y need ng-animate stuff need is

.wrapper.ng-hide-add{     display:block !important;     opacity:1; }  .wrapper.ng-hide-remove{     display:block !important;     opacity:0; } 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -