Skip to content

Commit 6bd7178

Browse files
committed
ui-scroll.js:
* Replace deprecrated .bind() and .unbind() with .on() and .off() respectively. * angular-ui#241 * https://api.jquery.com/category/deprecated/deprecated-3.0/
1 parent a957d07 commit 6bd7178

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ui-scroll.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,10 @@ angular.module('ui.scroll', [])
224224

225225
$scope.$on('$destroy', () => {
226226
unbindEvents();
227-
viewport.unbind('mousewheel', wheelHandler);
227+
viewport.off('mousewheel', wheelHandler);
228228
});
229229

230-
viewport.bind('mousewheel', wheelHandler);
230+
viewport.on('mousewheel', wheelHandler);
231231

232232
initialize();
233233

@@ -238,13 +238,13 @@ angular.module('ui.scroll', [])
238238
}
239239

240240
function bindEvents() {
241-
viewport.bind('resize', resizeAndScrollHandler);
242-
viewport.bind('scroll', resizeAndScrollHandler);
241+
viewport.on('resize', resizeAndScrollHandler);
242+
viewport.on('scroll', resizeAndScrollHandler);
243243
}
244244

245245
function unbindEvents() {
246-
viewport.unbind('resize', resizeAndScrollHandler);
247-
viewport.unbind('scroll', resizeAndScrollHandler);
246+
viewport.off('resize', resizeAndScrollHandler);
247+
viewport.off('scroll', resizeAndScrollHandler);
248248
}
249249

250250
function reload() {

0 commit comments

Comments
 (0)