Replaced ng-click with element.on()