{"action":"closed","issue":{"url":"https://api.github.com/repos/robflaherty/jquery-scrolldepth/issues/69","labels_url":"https://api.github.com/repos/robflaherty/jquery-scrolldepth/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/robflaherty/jquery-scrolldepth/issues/69/comments","events_url":"https://api.github.com/repos/robflaherty/jquery-scrolldepth/issues/69/events","html_url":"https://github.com/robflaherty/jquery-scrolldepth/issues/69","id":97493088,"number":69,"title":"New methods for Single Page Applications","user":{"login":"robflaherty","id":159644,"avatar_url":"https://avatars.githubusercontent.com/u/159644?v=3","gravatar_id":"","url":"https://api.github.com/users/robflaherty","html_url":"https://github.com/robflaherty","followers_url":"https://api.github.com/users/robflaherty/followers","following_url":"https://api.github.com/users/robflaherty/following{/other_user}","gists_url":"https://api.github.com/users/robflaherty/gists{/gist_id}","starred_url":"https://api.github.com/users/robflaherty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robflaherty/subscriptions","organizations_url":"https://api.github.com/users/robflaherty/orgs","repos_url":"https://api.github.com/users/robflaherty/repos","events_url":"https://api.github.com/users/robflaherty/events{/privacy}","received_events_url":"https://api.github.com/users/robflaherty/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-27T15:44:17Z","updated_at":"2015-11-20T01:35:22Z","closed_at":"2015-11-20T01:35:22Z","body":"If anyone is willing to try this out I added 3 methods for working with Scroll Depth in a Single Page Application context. The changes are in this feature branch: https://github.com/robflaherty/jquery-scrolldepth/tree/SPA-features.\r\n\r\n```\r\n// Resets Scroll Depth with the originally initialized options.\r\n$.scrollDepth.reset();\r\n\r\n// Add DOM elements to be tracked. Accepts an array. Calling without arguments lists currently tracked elements.\r\n$.scrollDepth.elemPush(['#newElem', '#anotherElem']);\r\n\r\n// Remove DOM elements to be tracked. Accepts an array. Calling without arguments lists currently tracked elements.\r\n$.scrollDepth.elemRemove(['#newElem']);\r\n\r\n```\r\nAny feedback and help appreciated!\r\n"}}