First attempt at lazy loading (deferring the load of embedded YouTube videos) - how can I do this more gracefully?
问题 Yesterday I decided to improve the way my website loads YouTube videos by only embedding them when a user requests them. Sometimes a page could have as many as 30 videos on, and this would take a long time to load. This is the first time I've attempted a "lazy loading" method of anything, and I figured it would be well worth asking: What can I do to improve on this? How can I make it a bit more graceful? Does this completely miss the point of deferred loading? JSFiddle. Ignore the styling as