Home Scroll up to Load More Data in angular1
Reply: 0

Scroll up to Load More Data in angular1

user505
1#
user505 Published in May 21, 2018, 9:17 am

I want to add scroll up to load more data in div. I want to implement it on message detail screen where user can scroll up to load more message.

document.getElementById("myDIV").addEventListener("scroll", myFunction);

function myFunction() {
    if (document.getElementById("myDIV").scrollTop === 0) {
      // call api to fetch data
    }
}

I have implemented this it's working fine. But evet fire multiple time. If i have to call event only one time.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.322161 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO