1

I made a web page for iPhone, where there are a top and a bottom fixed div. In between them, there is a scrollable div. I am using '-webkit-overflow-scrolling: touch;' to enable fast scrolling.

Now, if the scroll reach the top or the bottom of the middle div, the rubber band effect happens. It is a desired effect for me!

But then, How do I capture the event? So that i can use javascript/jquery do something fun upon the rubber band effect. Thanks!

4

1 回答 1

1

啊,可以这么简单

scrollable_div.on('touchmove', function () {
    if (its_first_element.position().top > top_fixed_div.height()) {
        // Rubber band effect happened, assuming the scrollable_div is vertically next to the top_fixed_div
    }
});
于 2013-10-25T22:39:47.273 回答