Dierig Patrick
Dierig Patrick

Reputation: 186

Disable Scrolling in Div

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?

http://www.be-virtual.org/schnittchen

Upvotes: 0

Views: 2327

Answers (3)

Saïd Mezhoud
Saïd Mezhoud

Reputation: 13

In your jquery.mousewheel.js > comment the type event "mousewheel"

53  //event.type = "mousewheel";

Upvotes: 0

michal zagrodzki
michal zagrodzki

Reputation: 236

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.

Upvotes: 2

Xariez
Xariez

Reputation: 789

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 */

Upvotes: 0

Related Questions