Dynamic Scroll Position In Jquery
Please help me for below scenario i have 3 pages in place and user scrolls the page when scroll reach the second page, it has to find the specific ID and then trigger a function.
Solution 1:
There is a great plugin to do this called WAYPOINT
I have setup an example on jsfiddle check it out
HTML
<divclass="first"></div><divclass="second"></div>
CSS
.first {
background:green;
height: 600px;
width:100%;
}
.second {
background:red;
height: 600px;
width:100%;
}
JS
$('.second').waypoint(function() {
alert('You have scrolled to an entry.');
}, {
offset: '100%'
});
Post a Comment for "Dynamic Scroll Position In Jquery"