{"action":"created","issue":{"url":"https://api.github.com/repos/robflaherty/jquery-scrolldepth/issues/24","labels_url":"https://api.github.com/repos/robflaherty/jquery-scrolldepth/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/robflaherty/jquery-scrolldepth/issues/24/comments","events_url":"https://api.github.com/repos/robflaherty/jquery-scrolldepth/issues/24/events","html_url":"https://github.com/robflaherty/jquery-scrolldepth/issues/24","id":30405548,"number":24,"title":"\"reloading\" scrolldepth","user":{"login":"zepedrorocha","id":5140092,"avatar_url":"https://avatars.githubusercontent.com/u/5140092?v=3","gravatar_id":"","url":"https://api.github.com/users/zepedrorocha","html_url":"https://github.com/zepedrorocha","followers_url":"https://api.github.com/users/zepedrorocha/followers","following_url":"https://api.github.com/users/zepedrorocha/following{/other_user}","gists_url":"https://api.github.com/users/zepedrorocha/gists{/gist_id}","starred_url":"https://api.github.com/users/zepedrorocha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zepedrorocha/subscriptions","organizations_url":"https://api.github.com/users/zepedrorocha/orgs","repos_url":"https://api.github.com/users/zepedrorocha/repos","events_url":"https://api.github.com/users/zepedrorocha/events{/privacy}","received_events_url":"https://api.github.com/users/zepedrorocha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-03-28T17:15:11Z","updated_at":"2015-02-02T11:31:28Z","closed_at":null,"body":"Hello. I'm using AngularJS page routing (Multiple Views). Since i don't refresh the entire webpage your code will unbind scroll event, eventually.\r\n\r\n```javascript\r\n// If all marks already hit, unbind scroll event\r\n      if (cache.length >= 4 + options.elements.length) {\r\n        $window.off('scroll.scrollDepth');\r\n        return;\r\n      }\r\n```\r\n\r\nI wish I could \"reload\" the scrolldepth when the View is changed. I'm asking for some advise to find the best option. Thank you"},"comment":{"url":"https://api.github.com/repos/robflaherty/jquery-scrolldepth/issues/comments/72442522","html_url":"https://github.com/robflaherty/jquery-scrolldepth/issues/24#issuecomment-72442522","issue_url":"https://api.github.com/repos/robflaherty/jquery-scrolldepth/issues/24","id":72442522,"user":{"login":"nandy-andy","id":1662451,"avatar_url":"https://avatars.githubusercontent.com/u/1662451?v=3","gravatar_id":"","url":"https://api.github.com/users/nandy-andy","html_url":"https://github.com/nandy-andy","followers_url":"https://api.github.com/users/nandy-andy/followers","following_url":"https://api.github.com/users/nandy-andy/following{/other_user}","gists_url":"https://api.github.com/users/nandy-andy/gists{/gist_id}","starred_url":"https://api.github.com/users/nandy-andy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nandy-andy/subscriptions","organizations_url":"https://api.github.com/users/nandy-andy/orgs","repos_url":"https://api.github.com/users/nandy-andy/repos","events_url":"https://api.github.com/users/nandy-andy/events{/privacy}","received_events_url":"https://api.github.com/users/nandy-andy/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T11:31:28Z","updated_at":"2015-02-02T11:31:28Z","body":"Hi!\r\n\r\nI had similar issues. And I resolved them in [my fork](https://github.com/nandy-andy/jquery-scrolldepth/compare/robflaherty:master...master).\r\n\r\nWe're creating single page application with Ember and we wanted to use your useful plugin :smile_cat:  The issue was with caching in your plugin and detaching `scroll.scrollDepth` event after reaching all points. The changes I implemented are rather simple:\r\n* I added a `detachEventOnceCacheIsFull` flag which is backward compatible but once set to `false` never detach the scroll event,\r\n*  exposed a simple `reset()` method for resetting the cache while transitioning to new view.\r\n\r\n@robflaherty, should I create a pull request and you'll merge it? Or do you want to wait till you remove jQuery dependency and you'll go with your version?"}}