I want to call a function right after a scroll ends. I have tried a load of different things, none of which have quite worked, and then I came upon this solution in
Sorry, I completely ignored the fact that the function was within the closure, and therefore not available to the page in my earlier response. You could make it work via something like:
window.scrollEnded = function () { console.log('scrollEnded. No do something astounding'); }
followed by a
window.setTimeout(window.scrollEnded, 500);
That should remove the eval of the string, as well as put it in a global scope to where it is available. There are other oddities about that in terms of namespace pollution, but for the time being I'm trying to be somewhat simple and help you get it work.