开发者

Is it possible to create a jQuery event that triggers when a scrollbar is released?

I would like to know how would one go about creating a jQuery event that would trigger when a scroll marker is released if scrolling with mouse (and also when scrolling with keyboard).

When searching the Internet I have found a special scrollstop event here that triggers when scrolling stops, but that开发者_JAVA百科 includes the case when scrollbar is still being held. Can events somehow be combined, so let's say scrollstop event only triggers when mouse is released also?


No you can't do such a thing. The reason is that you can only catch click events on the page. The scrollbar is part of the browser not the page. Only the scroll event is triggered for you by the browser. The other point is not to limit yourself to desktop computers. Webpages should work fine on mobile browsers. Some of them don't have scrollbars at all. They can trigger scroll event, but click events on a scrollbar would be useless.

The solution for you is to think differently. You may need to reconsider what you're really up to.

“We can't solve problems by using the same kind of thinking we used when we created them.”

Albert Einstein


It is possible to combine events: jquery combine event functions

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜