Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jscrollPane not working at all

I know I use a bad title but I can't describe it different.

The code is here : http://jsfiddle.net/FFjgc/3/

Header :

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

<link rel="stylesheet" type="text/css" href="http://jscrollpane.kelvinluck.com/style/jquery.jscrollpane.css" />
<script type="text/javascript" src="http://jscrollpane.kelvinluck.com/script/jquery.jscrollpane.min.js"></script>
<script type="text/javascript" src="http://jscrollpane.kelvinluck.com/script/jquery.mousewheel.js"></script>
<script type="text/javascript" src="http://jscrollpane.kelvinluck.com/script/mwheelIntent.js"></script>


<script type="text/javascript">
$(document).ready(function() {
    $('.scroll').jScrollPane();
});
</script>

And the css

.scroll {
width: 100%;
height: 200px;
overflow: auto;
}

It's so simple, I use all the libraries and I'm sure there is no error in the code since I'm looking at it the last 2 hours.

Thank you.

like image 877
mt0s Avatar asked Mar 08 '13 21:03

mt0s


Video Answer


2 Answers

There is no problem with the jQuery version. You should wrap your content with p tag to run Jscrollpane. In this way your content will look more semantic.

Example Here

like image 137
agriboz Avatar answered Oct 25 '22 03:10

agriboz


I ran this issue and finally jScrollPane is working with all its features using jQuery 1.9.1.

The solution was very straightforward: initialize the plugin on window.load.

$(window).load(function) {
  $(".your-selector").jScrollPane();
}

I hope this help someone

like image 21
snaphuman Avatar answered Oct 25 '22 01:10

snaphuman