Change the scroll bars with jQuery
JScrollPane is a jQuery plugin that allows us to give a visual aspect to the scroll bars of any element, something that Internet Explorer is very simple because it just use CSS but the other browsers has never been implemented, something rare and absurd but there is everything in this world.
To use it, we obviously need to load jQuery from the Google libraries so before </ head> :
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js' /> <script type='text/javascript'
Here is an optional script that will allow us to use the mouse wheel:
<script type='text/javascript' src=' URL_mousewheel.js' />
and finally the plugin itself, either in its standard version or minimized:
<script type='text/javascript' src=' URL_jscrollpane.min.js' />
If you do not want to use external files, the latter two can be added directametne in the template:
<script type='text/javascript'>
//<![ CDATA [
/ / Here paste the contents of mousewheel.js
/ / Here paste the contents of jscrollpane.min.js
//]]>
</ Script>
. JspContainer {
overflow: hidden;
position: relative;
}
. JspPane {position: absolute;}
. JspVerticalBar {
background-color: # 000;
height: 100%;
position: absolute;
right: 0;
top: 0;
width: 16px; / * defines the width of the vertical bar * /
}
. JspHorizontalBar {
background-color: # 000;
bottom: 0;
height: 16px; / * defines the height of the horizontal bar * /
left: 0;
position: absolute;
width: 100%;
}
. JspVerticalBar *,. JspHorizontalBar * {margin: 0; padding: 0;}
/ * These are the rules for configuring the plugin * /
. JspTrack {/ * is the box where you move the slider * /
background-color: # 000;
position: relative;
}
. JspDrag {/ * is the slider itself * /
background-color: # 888;
cursor: pointer;
left: 0;
position: relative;
top: 0;
}
. JspHorizontalBar. JspTrack. JspHorizontalBar. JspDrag {
float: left;
height: 100%;
}
</ Style>
. Scroll-pane {height: 200px; overflow: auto; width: 100%;}
. Horizontal {height: auto; max-height: 200px;}
</ Style>
<div style="width: 500px;">
<div class="scroll-pane">
<p> ....... content through ... </ P>
</ Div>
</ Div>
<div style="width: 500px;">
<div class="scroll-pane horizontal">
<p style="width: 1000px;"> ....... content through ... </ P>
</ Div>
</ Div>
And call the function using the class that we defined:
<script type="text/javascript">
$ (Function () {$ ('. Scroll-pane'). JScrollPane ();});
</ Script>
The possibilities are multiple, in the developer page there are several explanatory demos which combines the bar, you add buttons, etc.
Εxcellеnt wау of ԁescгibіng, and eѕsentіal editorіal to get
data сoncernіng my pгesentation tοpic, which i
am going to deliνer іn collegе.
Feel frеe to νіsit my web page; secured loans online