I'm having trouble triggering a scroll event using jquery.mousewheel. I want to "expand" the scroll event for the # bio-content-container to trigger when scrolling over the # bio-slider container. I am using the following code:
var lastScrollTop = 0; $("#bio-content-container").scroll(function () { var st = $(this).scrollTop(); if (st > lastScrollTop){ scroll('Down'); } else { scroll('Up'); } lastScrollTop = st; }); jQuery(function($) { $('#bio-slider-container') .bind('mousewheel', function(event, delta) { $("#bio-content-container").trigger('scroll'); return false; }); });
I do not want to trigger scrolling on # bio-slider-container, so I use the mouse wheel. Any help would be greatly appreciated :)
source share