I am trying to convert a piece of code from jQuery to Angular, and since I am super new to this I am not sure if I am doing this right.
Here is the jquery code:
$('ul.nav li.dropdown').hover(function(){
$(this).find('.dropdown-menu').stop(true, true).delay(300).fadeIn();
}, function(){
$(this).find('.dropdown-menu').stop(true, true).delay(300).fadeOut();
});
What it is doing is when I mouseover a nav item, a div fades in.
This is what I have tried, but nothing happens:
angular.module("headToggle", ["ngAnimate"]).animation(".management-settings", function(){
return{
enter: function(element, done){
element.css("display", "none");
element.fadeIn(200, done);
return function(){
element.stop();
};
},
leave: function(element, done){
element.fadeOut(200, done);
return function(){
element.stop();
};
}
};
});
What am I doing wrong? Is what I am doing overkill?