How to capture scroll start event on iPhone/Android

后端 未结 3 1276
我寻月下人不归
我寻月下人不归 2021-01-07 02:22

I\'m using JQuery with a mobile site to reposition the header nav on scroll in the absence of position:fixed support. That works fine, when the user stops scrolling the head

3条回答
  •  忘掉有多难
    2021-01-07 02:40

    I believe jQuery Mobile, can do this. Take a look at the following code:

    $(document).bind("scrollstop", function() {
    
    //What occurs when the scrolling stops
    alert("You have stopped scrolling");
    });
    
    $(document).bind("scrollstart", function() {
    
    //What occurs when the scrolling starts
    alert("You have started scrolling");
    
    });
    

提交回复
热议问题