Since I do not own the information, I would like to receive information from and to, how to act on the DIV while scrolling to the center?
There are no specific examples, or rather, what I did turned out to be nonsense!
A ready-made solution is not interested, but a competent explanation with an example is required. The best answer will be rewarded after 2 days with 200 points for the work, the competition will be announced
Dear experts explain how this works?
var $win = $(window); var $marker = $('#marker'); $win.scroll(function() { if ($win.scrollTop() + $win.height() >= $marker.offset().top) { $win.unbind('scroll'); // load there } }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> This was taken from the toaster and did not work, and I tried such devices from the network 11