hyperexpert
hyperexpert

Reputation: 532

jquery scrollbars globally, not per div

I'm looking for a way to style my scrollbars globally! basically that styles scrollbar will just show up instead of the default scrollbars

To give an example, the webkit scrollbars styling basically you add the code once to your CSS and it applies to the whole side no matter where, no matter what div, when a scrollbar shows up, it shows up styled! I know this only works on webkit browsers, and I know there are many jquery scripts that let you style a div individually, but is there a way to add a jquery and have it automatically and globally style any scrollbar anywhere on the site?

My site is huge, and it would be almost impossible for me to go about that for each div.

The plug-in I am playing with right now is called nicescroll but any other plugin that you guys might suggest will be great!

Upvotes: 0

Views: 264

Answers (1)

munjal
munjal

Reputation: 1404

I think you are finding this one: Nicescroll.

Try it, it's very easy to use and it is very smooth.

Example (singular use, but it can be useful for someone else):

$(document).ready(function() {  
    $("#example_div").niceScroll();
});

Upvotes: 1

Related Questions