I have a carousel slider on the bottom of my website. Now that slider goes to the left and to the right when i scroll into that slider. I want to disable that. Know anyone how i can disable this feature?
Asked
Active
Viewed 1,788 times
3 Answers
2
Open file jquery.contencarousel.js and comment out (or remove it) following part of code:
// adds events to the mouse
$el.bind('mousewheel.contentcarousel', function(e, delta) {
if(delta > 0) {
if( cache.isAnimating ) return false;
cache.isAnimating = true;
aux.navigate( -1, $el, $wrapper, settings, cache );
}
else {
if( cache.isAnimating ) return false;
cache.isAnimating = true;
aux.navigate( 1, $el, $wrapper, settings, cache );
}
return false;
});
This part of code binds the scrolling by mouse with changing slides in your carousel.
![](../../users/profiles/4458715.webp)
michal zagrodzki
- 111
- 3
- 3
0
If you need to disable scrolling, you should be able to just add this to your CSS:
overflow-x: hidden; /* Horizontally */
overflow-y: hidden; /* Vertically */
overflow: hidden; /* Both ways */
![](../../users/profiles/4508613.webp)
Xariez
- 691
- 5
- 22
0
In your jquery.mousewheel.js > comment the type event "mousewheel"
53 //event.type = "mousewheel";
![](../../users/profiles/5417717.webp)
Saïd Mezhoud
- 13
- 4