开发者

Div not showing scrollbars with jScrollPane

开发者 https://www.devze.com 2023-03-24 16:45 出处:网络
Apologies if this question has already been asked, but I\'m struggling to find an answer on SO. I\'m using jQuery jScrollPane on a div. I can tell the plugin has been linked correctly as the standard

Apologies if this question has already been asked, but I'm struggling to find an answer on SO.

I'm using jQuery jScrollPane on a div. I can tell the plugin has been linked correctly as the standard browser scroll bar is removed, but no jScrollPane scrollbar is added in replacement, I just can't scroll down the content..

My markup is as simple as:

<div class="classa">
  ...Long content here...
</div>

Javascript:

$(document).ready(function(){
    $(".classa").jScrollPane();
});

Has anyone experienced this before? Is there something s开发者_运维百科imple I'm missing?

I think I might be missing some CSS somewhere or something, otherwise I don't know how to specify the colour of the scrollbar anyway...

Your help would be much appreciated


There is some sample CSS code for the jScrollPane example at this URL: http://www.kelvinluck.com/assets/jquery/jScrollPane/basic.html.

The sample CSS can be found at: http://www.kelvinluck.com/assets/jquery/jScrollPane/styles/jScrollPane.css

Hope that helps.


My mistake - that CSS is to be used with an older version of jScrollPane. The correct CSS to use can be found here: http://jscrollpane.kelvinluck.com/style/jquery.jscrollpane.css


try enclosing the ".... long content here....." in the

tag.

like so:

<div class="classa">
<p>
...Long content here...
</p>
</div>
0

精彩评论

暂无评论...
验证码 换一张
取 消