I want lazy to upload the results of my Youtube API search, so that when a user scrolls down, Youtube players are added to the page. It seems that the lazy download plugins are image oriented, but what I will download is just HTML, because I use iFrames to load Youtube players (in line with the new Youtube embed style). How to do it in jQuery? Thanks for reading.
If you understand correctly, you need something like:
$( "body").scroll( function() { $( "#youtubeDiv").load( "youtube.html"); });
Instead of loading you can add a html fragment.
.scroll() .ScrollTop(), , /. , iframe . , ( ) . .
What you want to do is probably easily accomplished with the jQuery infinite scroll plugin
Source available on github
Source: https://habr.com/ru/post/1766611/More articles:how a 32-bit processor can address 4 gigabytes of memory - operating-systemCurrent resources of rubies and rails (2010) - ruby | fooobar.comDefault values for an HTML form override actual post-time values in Internet Explorer 9 - javascriptHotlinking Protection - redirectЕсть ли какой-либо генератор Castle ActiveRecord из проекта моделирования Visual Studio 2010? - visual-studioWhat does Chrome do to speed up page display? - javascriptSQL Server: Why is xp_cmdshell disabled by default? - sql-serverBest way to encode a button with one click of one click to replace one checkbox and submit button form? - phpWhat does cpython do to help detect object loops (reference counting)? - pythonRemoving random access file in java - javaAll Articles