I need to do some actions when the div comes in the display area of the browser with jquery.
I gave some animation to the DIV, it is in the bottom of the webpage. But that animation need to start when the user scroll and reach that position.
I need to do some actions when the div comes in the display area of the browser with jquery.
I gave some animation to the DIV, it is in the bottom of the webpage. But that animation need to start when the user scroll and reach that position.
Try this:
$(document).scroll(function(){
if($(document).scrollTop() + $(window).height() > $("your div").offset().top){
// start your animation
}
});