Yesterday I went looking for what people are using to load content when it enters the window (is scrolled to).
I found jQuery waypoints.
Currently I'm using it on the homepage to load the animation of Zeah once it's scrolled to.
Unfortunately the plugin wasn't as easy to implement as I was led to believe. The issues I ran into had to do with altering the DOM with my loading scripts. I set the $.waypoint function to run at the right time (after everything is loaded) and now it seems to be working OK.
The waypoints site has a few demos that I'm dying to try out. Like a sticky nav and ad tracking. I don't ever plan to have ads on my site (especially not the homepage) but it would be useful to know when people are viewing content further down the page or if they're sticking to the first screen.
That brings me to throttle-debounce. I actually saw while looking through the waypoints source that they mention throttling, so I looked it up. Seems like it would be useful to implement on any events/functions that might be triggered several times (like hover overs and animations).
I didn't get a chance to look too much into it, but it's now on my to do list.
What do you use for "waypoints" and script throttling?
Leave you answer in the comments :)
I found jQuery waypoints.
Currently I'm using it on the homepage to load the animation of Zeah once it's scrolled to.
Unfortunately the plugin wasn't as easy to implement as I was led to believe. The issues I ran into had to do with altering the DOM with my loading scripts. I set the $.waypoint function to run at the right time (after everything is loaded) and now it seems to be working OK.
The waypoints site has a few demos that I'm dying to try out. Like a sticky nav and ad tracking. I don't ever plan to have ads on my site (especially not the homepage) but it would be useful to know when people are viewing content further down the page or if they're sticking to the first screen.
That brings me to throttle-debounce. I actually saw while looking through the waypoints source that they mention throttling, so I looked it up. Seems like it would be useful to implement on any events/functions that might be triggered several times (like hover overs and animations).
I didn't get a chance to look too much into it, but it's now on my to do list.
What do you use for "waypoints" and script throttling?
Leave you answer in the comments :)