Check if div is viewable in window?

前端 未结 5 1338
庸人自扰
庸人自扰 2021-01-04 05:33

I have a one page site with fixed navigation and using a scroll script, very similar to this: http://www.ivanjevremovic.in.rs/live/temptation/single/orange/index-cycle-slide

5条回答
  •  星月不相逢
    2021-01-04 06:34

    see the following lazyload plugin:

    http://plugins.jquery.com/files/jquery.lazyload.js__6.txt
    

    the section which starts with the comment "return the status of the item relative to the current view" checks to see if an element is visible in the viewport.

提交回复
热议问题