Introduction to the use of jScrollPane in jquery scrollbar plug in
- 2020-03-26 23:47:09
- OfStack
This is a js page scrollbar plug-in
Three files are introduced when using :(fill in the path by yourself)
Then add a method to the container that needs to add the scroll bar, and we're done
Great!
Ps: if you want to change the default style of the scrollbar, you can open the jquery.jscrollpane.css file and change it
Of course, this is a plug-in for jquery, and the original jquery package should be included before the plug-in package, which is omitted in this article.
Three files are introduced when using :(fill in the path by yourself)
<link type="text/css" href=" The path /jquery.jscrollpane.css" rel="stylesheet" media="all" />
<script type="text/javascript" src=" The path /jquery.mousewheel.js"></script>
<script type="text/javascript" src=" The path /jquery.jscrollpane.min.js"></script>
Then add a method to the container that needs to add the scroll bar, and we're done
$(function(){
$("#contentDiv").jScrollPane();
})
Great!
Ps: if you want to change the default style of the scrollbar, you can open the jquery.jscrollpane.css file and change it
Of course, this is a plug-in for jquery, and the original jquery package should be included before the plug-in package, which is omitted in this article.