From 315e283387fd1a52daa54711e0484d255bda1947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CJenya?= <“jzueva@gmail.com”> Date: Tue, 28 Mar 2017 13:36:16 -0400 Subject: [PATCH] jQuery 3+ deprecated `.bind`. Using `on` to attach an event handler instead of `.bind`. Fix taken from ui-router: https://github.com/angular-ui/ui-router/commit/a8aa40ab7c1433904b1f53f506d42d0faca14c3b --- src/ng-csv/directives/ng-csv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ng-csv/directives/ng-csv.js b/src/ng-csv/directives/ng-csv.js index bb8b4b8..d483fa2 100644 --- a/src/ng-csv/directives/ng-csv.js +++ b/src/ng-csv/directives/ng-csv.js @@ -113,7 +113,7 @@ angular.module('ngCsv.directives'). } } - element.bind('click', function (e) { + element[element.on ? 'on' : 'bind']('click', function (e) { scope.buildCSV().then(function (csv) { doClick(); });