TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
AngularJS Mouse Hover and Leave Event
Mohd Arif
Mar 19
2016
Code
1.1
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
<!DOCTYPE html>
<html>
<head>
<script src=
"https://ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular.min.js"
></script>
<style>
.pinkDiv {
width: 100px;
height: 100px;
background-color: Pink;
padding: 2px 2px 2px 2px;
}
.greenDiv {
width: 100px;
height: 100px;
background-color: Green;
padding: 2px 2px 2px 2px;
}
</style>
</head>
<body ng-app>
<h1>Angularjs mouse hover and leave
event
</h1>
<div ng-
class
=
"{pinkDiv: enter, greenDiv: leave}"
ng-mouseenter=
"enter=true;leave=false;"
ng-mouseleave=
"leave=true;enter=false"
> Mouse <span ng-show=
"enter"
>Enter</span> <span ng-show=
"leave"
>Leave</span> </div>
</body>
</html>
Angularjs
mouse hover
leave event