{"action":"created","issue":{"url":"https://api.github.com/repos/uikit/uikit/issues/1282","labels_url":"https://api.github.com/repos/uikit/uikit/issues/1282/labels{/name}","comments_url":"https://api.github.com/repos/uikit/uikit/issues/1282/comments","events_url":"https://api.github.com/repos/uikit/uikit/issues/1282/events","html_url":"https://github.com/uikit/uikit/issues/1282","id":79139528,"number":1282,"title":"Refreshing ScrollSpy","user":{"login":"zslabs","id":1018402,"avatar_url":"https://avatars.githubusercontent.com/u/1018402?v=3","gravatar_id":"","url":"https://api.github.com/users/zslabs","html_url":"https://github.com/zslabs","followers_url":"https://api.github.com/users/zslabs/followers","following_url":"https://api.github.com/users/zslabs/following{/other_user}","gists_url":"https://api.github.com/users/zslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/zslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zslabs/subscriptions","organizations_url":"https://api.github.com/users/zslabs/orgs","repos_url":"https://api.github.com/users/zslabs/repos","events_url":"https://api.github.com/users/zslabs/events{/privacy}","received_events_url":"https://api.github.com/users/zslabs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-21T19:59:20Z","updated_at":"2015-05-22T11:54:16Z","closed_at":null,"body":"Hi all,\r\nAttempting to use scrollspy to lazy load images, using the following:\r\n\r\n    lazyLoad = UIkit.scrollspy($('img[data-src]'), UIkit.Utils.options(\r\n      repeat: true\r\n    ))\r\n    lazyLoad.on 'inview.uk.scrollspy', ->\r\n      $(this).attr 'src', $(this).attr('data-src')\r\n      $(this).removeAttr 'data-src'\r\n      return\r\n\r\nThis works fine on server-side loads, but in a client-side driven application, I'm struggling to find a way to \"refresh\" the checks for the elements currently on the page. I've tried dispatching the event tied to checkScroll():\r\n\r\n    window.dispatchEvent new Event 'scrolling.uk.document'\r\n\r\nBut that hasn't proven to re-start the check. Any tips would be greatly appreciated. Thanks!\r\n\r\ncc @aheinze "},"comment":{"url":"https://api.github.com/repos/uikit/uikit/issues/comments/104642646","html_url":"https://github.com/uikit/uikit/issues/1282#issuecomment-104642646","issue_url":"https://api.github.com/repos/uikit/uikit/issues/1282","id":104642646,"user":{"login":"malles","id":5442402,"avatar_url":"https://avatars.githubusercontent.com/u/5442402?v=3","gravatar_id":"","url":"https://api.github.com/users/malles","html_url":"https://github.com/malles","followers_url":"https://api.github.com/users/malles/followers","following_url":"https://api.github.com/users/malles/following{/other_user}","gists_url":"https://api.github.com/users/malles/gists{/gist_id}","starred_url":"https://api.github.com/users/malles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malles/subscriptions","organizations_url":"https://api.github.com/users/malles/orgs","repos_url":"https://api.github.com/users/malles/repos","events_url":"https://api.github.com/users/malles/events{/privacy}","received_events_url":"https://api.github.com/users/malles/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T11:54:16Z","updated_at":"2015-05-22T11:54:16Z","body":"PS. Setting the option to `topoffset: 50` makes the image load 50px below the viewport. Repeat is not necessary. You can pass a plain js-object in the constructors, `UIkit.Utils.options( 'repeat: true' )` takes a long road returning the same."}}