问题
i want to use both of these jquery tools plugin in a page:
http://flowplayer.org/tools/demos/scrollable/site-navigation.html
and
http://flowplayer.org/tools/demos/scrollable/easing.html
but they conflict with each other.i mean when i scroll through the first one the second one also scroll.
how can i solve it?
回答1:
how to use two is in the same site of flowplayer
http://flowplayer.org/tools/scrollable/#features
the only thing that you need to do is put all the code in a div include in that the part of the next and prev button and that is all you can have alla the scrollable that you want and with CSS can change how it looks. :D
回答2:
Another possible solution is naming different "next", "prev" button classes.
for instance:
jQuery(".scrollable").scrollable({ next: '.scrollableTwoNext', prev: '.scrollableTwoPrev', easing: 'custom',speed: 700 });
This helped me when puting didn't.
Hope this helps someone
回答3:
This will depend on how the plugin was designed... if it is looking for an element with a unique ID (or it generates only 1 ID) then it won't handle multiple instances.
However if you are using it in 2 places, but using the same ID's more than once (invalid), that is something you will have to change. e.g. Just use 2 different ID's.
If you can add some sample code, we can help debug it.
回答4:
Make sure you aren't using the same class for both of them, I notice they both use .scrollable
in their examples. If you post your code it would help in answering though.
Example of what might work depending on your code.
$(".horScroll").scrollable({ circular: true }).navigator(".navi");
$(".easeScroll").scrollable({easing: 'custom', speed: 700, circular: true});
Notice they both are called something different.
来源:https://stackoverflow.com/questions/5246885/two-scrolling-jquery-tools-plugin-in-a-page