Raji
Raji

Reputation: 845

Change background color of scrollbar using jquery-jScrollpane plugin

I m using jquery-jScrollpane plugin. Using that plugin how can i change the background color of scrollbar as transparent and the Dragging bar in different color say orange?

Thanks.

Upvotes: 0

Views: 3354

Answers (2)

Rolands.EU
Rolands.EU

Reputation: 149

You can change red background by using this CSS:

.jspVerticalBar{
 background-color: transparent;
}

and later re-declare your own background to anything:

.jspTrack{
 background:url(../img/scroll_bar.png) 0 0 repeat-y transparent;
}
.jspDrag{
 background: url(../img/scroll.png) 0 0 no-repeat transparent;
}

this worked for me

Upvotes: 1

unloco
unloco

Reputation: 7320

you can modify the css that comes with the plugin

.jScrollPaneTrack {
    background: transparent;
} /* or just remove the background property*/

.jScrollPaneDrag {
    background: red;
}

or using js

$('.jScrollPaneTrack').css('background','transparent');
$('.jScrollPaneDrag').css('background','red');

Upvotes: 2

Related Questions