Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Following function has the scroll event attached, which then triggers the custom event defined on line 5.
- Line 5 seems to be causing the function to invoke twice (if removed line 4 is printed once, with line 5 its twice).
- Custom event should only fire once, at the moment its twice.
- */
- this.on(window, 'scroll', function (event) {
- setTimeout(xxx, function() {
- var win = $(window);
- if ($(document).height() - win.height() === win.scrollTop()) {
- console.log('testing 123');
- this.trigger('uiHandlRequest', { type: 'foo' });
- return false;
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement