I'm trying to lazy load (which is when you wait until someone scrolls into view of an item to load it) an entire web page, not just images. It is a similar format to the instagram home where you scroll and it loads as you scroll or the same with facebook and pinterest. I only want it in javascript though. I don't have any clue on how to do it (all other methods I found were extremely complicated and I couldn't implement them) but in conclusion a simple lazy load (another example is IFUNNY). Thanks!
-
2I don't have any clue on how to do it Unfortunately we expect some sort of input on SO. Show some code that you've tried, the HTML that you start with and the HTML that you want to load; give us something to work with.Bram Vanroy– Bram Vanroy2015-06-30 14:22:37 +00:00Commented Jun 30, 2015 at 14:22
-
1I'm not sure that instagram is performing a lazy load the way to describe. IMO, they are just loading more images as you scroll, wich is more "infinite Scroll". This is done with a watcher on scroll position and an XHR queryaorfevre– aorfevre2015-06-30 14:26:42 +00:00Commented Jun 30, 2015 at 14:26
-
check this out stackoverflow.com/questions/21963306/…Robin– Robin2015-06-30 14:29:29 +00:00Commented Jun 30, 2015 at 14:29
Add a comment
|
1 Answer
- First listen to pagescroll
- Second get scrollbar position
- Third if scrollbar position >= 95% load data via Ajax
3 Comments
cobo16
could you give some code as an example
schnawel007
Use JQuery and use the Information of the Links.
cobo16
Im kindof a newbie but how do you use jquery like what is it