问题
I've pretty much successfully implemented an instance of jQuery's "scrollable" plugin but I'm having a peculiar issue with mouse wheel navigation.
If you attempt to mouse wheel when the scrollable pane is in its initial state, nothing happens. But if you navigate with the buttons and then use the mouse wheel it scrolls back to the beginning then stops working.
The reason seems to be that it interprets every mouse wheel move as a backwards move. Why is this? And can it be changed? (Everything works fine on every other version of the plug in I've come across).
I've tried various approached such as using different variations of the jQuery Tool kit and even linking to the mousewheel plugin separately but no cigars forthcoming so any help would be really great. Thank you.
Here's a page with the faulty plug in.
回答1:
At the bottom of the vertical scrollable demo there is a paragraph stating:
Note: this mousewheel tool is not included in the standard jQuery Tools distribution. You must download a custom combination that includes this tool.
You can either download the full version*, which includes that mousewheel tool or you can customize it yourself.
Here is a live demo, with your plugin, that does not properly include the mousewheel tool.*
Here is a live demo, with the full JQuery tools plugin in the resources, including the mousewheel tool.*
*Important:
You are using (all)http://cdn.jquerytools.org/1.2.6/all/jquery.tools.min.js
While my demo uses (full)http://cdn.jquerytools.org/1.2.6/full/jquery.tools.min.js
来源:https://stackoverflow.com/questions/9702563/mouse-wheel-behaving-strangely-with-jquery-tools-scrollable-plugin