Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html lang="en">
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/css/foundation.min.css" rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
    <meta charset="UTF-8">
    <title>Anglar Behaviors</title>
</head>
    <body ng-app="app">
        
          <div enter leave>here is the text to mouse over</div>
    </body>
</html>
 
var app = angular.module('app', []);
app.directive('enter', function () {
  return function (scope, element) {
    element.bind('mouseenter', function () {
      console.log('The mouse has entered the zone.');
    });
  };
});
app.directive('leave', function () {
  return function (scope, element) {
    element.bind('mouseleave', function () {
      console.log('The mouse is gone.');
    });
  };
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x