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

Vitaly
  • 1,261
  • 2
  • 10
  • 20
armin momeni
  • 181
  • 2
  • 10

1 Answers1

0

With jQuery, set class scrollbar for your div containers. And initialize these in each loop:

jQuery('.scrollbar').each(function(){
    Ps.initialize(jQuery(this), {
        wheelSpeed: 2
    });
})
Vitaly
  • 1,261
  • 2
  • 10
  • 20
  • you mean this? $("div").addClass("scrollbar"); jQuery('.scrollbar').each(function(){ Ps.initialize(jQuery(this), { wheelSpeed: 2 }); }) scrollbar added to all div elements but doesn't change to perfect-scrollbar – armin momeni Jun 11 '16 at 11:41
  • its a jsf code that renders html but a sample for id="east" that i used before is here:
    @Vitali
    – armin momeni Jun 11 '16 at 11:56