How can I lazy load non-image content in jQuery? -


I want to laze the results of my YouTube API search, so that when the user scrolls, on the YouTube players page It seems that the lazy loading plugins are focused on images, but whatever I am loading is just HTML because I'm using IFrame to load the YouTube player (according to the new YouTube embed style) I am How do I do this in jQuery? Thanks for reading.

If I understand you correctly, then you need something:

  $ ("body"). Scroll (function () {$ ("#youtubeDiv"). Load ("youtube.html");});  

Instead of loading you can add html piece.


Comments