0

I used perfec-scrollbar and works fine like this

Ps.initialize(east, {
    wheelSpeed: 2
});

and now i want change all scroll-bars to perfect-scrollbar, how can i do that? something like :

Ps.initialize("*", {
    wheelSpeed: 2
});

But this doesn't work

4

1 回答 1

0

使用 jQuery,scrollbar为您的 div 容器设置类。each并在循环中初始化它们:

jQuery('.scrollbar').each(function(){
    Ps.initialize(jQuery(this), {
        wheelSpeed: 2
    });
})
于 2016-06-11T11:21:56.887 回答