Greg
Greg

Reputation: 3063

Incorrect code syntax (scrollbar)

I'm trying to implement this scrollbar and would like to change the scroll inertia but looks like I made a syntax error in the code below. Would you know what the error is? Many thanks

<script>
    (function($){
        $(window).load(function(){
            $(".content_2").mCustomScrollbar()
            scrollInertia:150
        });
    })(jQuery);
</script>

Upvotes: 0

Views: 104

Answers (3)

Adil Shaikh
Adil Shaikh

Reputation: 44740

 $(window).load(function(){
     $(".content_2").mCustomScrollbar({
          scrollInertia:150
     });      
 });

You should see examples here for proper usage -

http://manos.malihu.gr/jquery-custom-content-scroller/

Upvotes: 0

Schleis
Schleis

Reputation: 43750

You are not passing in the data but trying to define an object somehow.

$(".content_2").mCustomScrollbar({
            scrollInertia:150
});

Upvotes: 1

Claudio Redi
Claudio Redi

Reputation: 68440

Change

$(".content_2").mCustomScrollbar()
scrollInertia:150

by

$(".content_2").mCustomScrollbar({
   scrollInertia:150
});

Upvotes: 1

Related Questions