Active
Project:
Mouse Wheel
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2008 at 05:48 UTC
Updated:
26 Nov 2010 at 22:36 UTC
Does anyone know how to configure the jcarousel to allow for scrolling with the mousewheel plugin?
I'm trying to figure out what belongs to NEXTFUNCTION and PREVIOUSFUNCTION...
<?php
$(document).ready(function() {
jCarousel mousewheel scrolling
$('#DIV')
.mousewheel(function(event, delta) {
if (delta > 0)
$('.jcarousel-next-vertical').NEXTFUNCTION;
else if (delta < 0)
$('.jcarousel-prev-vertical').PREVIOUSFUNCTION;
return false; // prevent default
});
?>
Comments
Comment #1
robloachUsing the Mouse Wheel module, it's something like this:
.... And then in your custom JavaScript, you would use:
The MouseWheel module needs backport to 5.
Comment #2
spiffyd commentedHi Rob, thanks for the documentation!
Hm... so for clarification, where do I place the code...
any where on my page.tpl.php? As a script or php insert?
Comment #3
robloachIn your page.tpl.php....... '#jcarousel' is the ID of the carousel on the page.
Comment #4
spiffyd commentedThere's no need to place that mousewheel_add code within
?Comment #5
robloachThink this could go into core jCarousel module?
Comment #6
silurius commentedSubscribing.
Comment #7
quicksketchConsidering a total of 11 modules currently use the Mouse Wheel module, versus thousands using jCarousel, I think it would make more sense for Mouse Wheel to include support for jCarousel rather than the other way around (less popular modules generally provide support for the more popular ones).