javascript - How to check scroll to element from different page? -




i have scroll on 2 different pages in site when scroll in 1 of them both pages load own scroll data. don't want load scrolling of site @ once; want load page scroll only.

page1.php

<div id="page1"></div> 

page2.php

<div id="page2"></div> 

load.js

$(window).scroll(function() {    if ($(window).scrolltop() + $(window).height() >= $(document).height()) {     page1();     page2();   } });  function page1(load) {     $("#page1").text("page1"); } function page2(load) {     $("#page2").text("page2"); } 





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -