Skip to content

Commit 60ebd44

Browse files
Dona278christopherthielen
authored andcommitted
Replaced deprecated jquery functions (#2996)
Since jQuery 3.0, both .bind() and .unbind() have been deprecated. The suggested replacements are: jquery.bind() => jquery.on() jquery.unbind() => jquery.off()
1 parent 7c54b75 commit 60ebd44

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ng1/directives/stateDirectives.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ function $StateRefDirective($state: StateService, $timeout: ITimeoutService) {
181181

182182
if (!type.clickable) return;
183183
hookFn = clickHook(element, $state, $timeout, type, function() { return def; });
184-
element.bind("click", hookFn);
184+
element.on("click", hookFn);
185185
scope.$on('$destroy', function() {
186-
element.unbind("click", hookFn);
186+
element.off("click", hookFn);
187187
});
188188
}
189189
};
@@ -234,9 +234,9 @@ function $StateRefDynamicDirective($state: StateService, $timeout: ITimeoutServi
234234

235235
if (!type.clickable) return;
236236
hookFn = clickHook(element, $state, $timeout, type, function() { return def; });
237-
element.bind("click", hookFn);
237+
element.on("click", hookFn);
238238
scope.$on('$destroy', function() {
239-
element.unbind("click", hookFn);
239+
element.off("click", hookFn);
240240
});
241241
}
242242
};

0 commit comments

Comments
 (0)