Skip to content

Commit

Permalink
Replaced deprecated jquery functions (#2996)
Browse files Browse the repository at this point in the history
Since jQuery 3.0, both .bind() and .unbind() have been deprecated.
The suggested replacements are:
jquery.bind() => jquery.on()
jquery.unbind() => jquery.off()
  • Loading branch information
Dona278 authored and christopherthielen committed Sep 14, 2016
1 parent 7c54b75 commit 60ebd44
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ng1/directives/stateDirectives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ function $StateRefDirective($state: StateService, $timeout: ITimeoutService) {

if (!type.clickable) return;
hookFn = clickHook(element, $state, $timeout, type, function() { return def; });
element.bind("click", hookFn);
element.on("click", hookFn);
scope.$on('$destroy', function() {
element.unbind("click", hookFn);
element.off("click", hookFn);
});
}
};
Expand Down Expand Up @@ -234,9 +234,9 @@ function $StateRefDynamicDirective($state: StateService, $timeout: ITimeoutServi

if (!type.clickable) return;
hookFn = clickHook(element, $state, $timeout, type, function() { return def; });
element.bind("click", hookFn);
element.on("click", hookFn);
scope.$on('$destroy', function() {
element.unbind("click", hookFn);
element.off("click", hookFn);
});
}
};
Expand Down

0 comments on commit 60ebd44

Please sign in to comment.