{"action":"created","issue":{"url":"https://api.github.com/repos/jashkenas/backbone/issues/3691","labels_url":"https://api.github.com/repos/jashkenas/backbone/issues/3691/labels{/name}","comments_url":"https://api.github.com/repos/jashkenas/backbone/issues/3691/comments","events_url":"https://api.github.com/repos/jashkenas/backbone/issues/3691/events","html_url":"https://github.com/jashkenas/backbone/issues/3691","id":90624464,"number":3691,"title":"how can listenTo scroll events?","user":{"login":"xueyuchen","id":10018074,"avatar_url":"https://avatars.githubusercontent.com/u/10018074?v=3","gravatar_id":"","url":"https://api.github.com/users/xueyuchen","html_url":"https://github.com/xueyuchen","followers_url":"https://api.github.com/users/xueyuchen/followers","following_url":"https://api.github.com/users/xueyuchen/following{/other_user}","gists_url":"https://api.github.com/users/xueyuchen/gists{/gist_id}","starred_url":"https://api.github.com/users/xueyuchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xueyuchen/subscriptions","organizations_url":"https://api.github.com/users/xueyuchen/orgs","repos_url":"https://api.github.com/users/xueyuchen/repos","events_url":"https://api.github.com/users/xueyuchen/events{/privacy}","received_events_url":"https://api.github.com/users/xueyuchen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-24T09:33:47Z","updated_at":"2015-06-24T12:36:17Z","closed_at":"2015-06-24T12:36:17Z","body":"how can listenTo scroll events?"},"comment":{"url":"https://api.github.com/repos/jashkenas/backbone/issues/comments/114851412","html_url":"https://github.com/jashkenas/backbone/issues/3691#issuecomment-114851412","issue_url":"https://api.github.com/repos/jashkenas/backbone/issues/3691","id":114851412,"user":{"login":"jridgewell","id":112982,"avatar_url":"https://avatars.githubusercontent.com/u/112982?v=3","gravatar_id":"","url":"https://api.github.com/users/jridgewell","html_url":"https://github.com/jridgewell","followers_url":"https://api.github.com/users/jridgewell/followers","following_url":"https://api.github.com/users/jridgewell/following{/other_user}","gists_url":"https://api.github.com/users/jridgewell/gists{/gist_id}","starred_url":"https://api.github.com/users/jridgewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jridgewell/subscriptions","organizations_url":"https://api.github.com/users/jridgewell/orgs","repos_url":"https://api.github.com/users/jridgewell/repos","events_url":"https://api.github.com/users/jridgewell/events{/privacy}","received_events_url":"https://api.github.com/users/jridgewell/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T12:36:17Z","updated_at":"2015-06-24T12:36:17Z","body":"Specifying the `scroll` event in the `events` object works perfectly.\r\n\r\n```js\r\nvar View = Backbone.View.extend({\r\n  events: {\r\n    scroll: 'onScroll'\r\n  }\r\n});\r\n```\r\n\r\nKeep in mind this [caveat](http://api.jquery.com/scroll/):\r\n\r\n> The scroll event is sent to an element when the user scrolls to a different place in the element. It applies to window objects, but also to scrollable frames and elements with the overflow CSS property set to scroll (or auto when the element's explicit height or width is less than the height or width of its contents)."}}