Home
Tutorials
Microsoft Technologies Tutorials
Java Programming Tutorials
Web Designing Tutorials
Script Programming Tutorials
Database Programming Tutorials
Mobile Technologies Tutorials
Other Programming Tutorials
Examples
Articles
Tools
News
Angularjs Events Example
Keywords : Angularjs events ($event) example, How to use events in angularjs with example, Angularjs ng-mouseenter, ng-mouseleave events example
Example
<!DOCTYPE html> <html> <head> <title> AngularJs Events Example </title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <style type="text/css"> .divstyle { padding:20px; border:1px solid black; width:30%; font-weight:bold; background-color:#2b8bc0; color:White; } .mousestyle { background-color:#f2672e; } </style> </head> <body> <div ng-app=""> <h2>AngularJs Events Example</h2> <div class="divstyle" ng-class="{mousestyle: param1}" ng-mouseenter="param1 = true" ng-mouseleave="param1 = false"> Changing Colors on Mouse Hover and Mouse Leave </div> </div> </body> </html>
Click Here to See Result
Result
Previous
Next