JQuery

HTML
<div id="fancyBox"></div>
JavaScript
$('#fancyBox').on('click', function() {
  alert('The box was clicked');
});

Angular Binding

HTML
<div ng-app="app" ng-controller="appController">  
  <div ng-click="fancyBox()"></div>
<div>
JavaScript
angular.module('app', [])  
.controller('appController', function($scope) {
  $scope.fancyBox = function() {
    alert('The box was clicked');
  };
});