Chrome 中刷新页面时 JScrollPane 消失
我已经在我正在设计的网站中实现了垂直 JScrollPane。它在 Firefox 和 IE 中正确显示,但在 Chrome 中,它在页面加载时以及访问打开滚动条的其他链接时正确显示。
但是,如果我只是刷新页面,滚动条就会消失。
任何帮助将不胜感激!
- jScrollPane -v2.0.0beta4
- Jquery - v1.4.2
- chome - v6.0.4
HTML:
<div id = "right_left">
<div class="Scroller-container">
... php foreach displaying list of images ...
</div>
</div>
CSS:
#right_left{
margin-top:10px;
width:145px;
padding-left:20px;
}
.Scroller-container{
width: 100%;
height:800px;
overflow:auto;
}
.jspVerticalBar
{
left: 0;
}
JS+包括:
<link href="<? echo base_url(); ?>/css/style.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
<script type="text/javascript" src="<? echo base_url(); ?>/scripts/jquery.em.js"></script>
<script type="text/javascript" src="<? echo base_url(); ?>/scripts/jqModal.js"></script>
<link type="text/css" href="scripts/jScrollPane/style/jquery.jscrollpane.css" rel="stylesheet" media="all" />
<script type="text/javascript" src="scripts/jScrollPane/script/jquery.mousewheel.js"></script>
<script type="text/javascript" src="scripts/jScrollPane/script/jquery.jscrollpane.min.js"></script>
$(document).ready(function(){
$(function()
{
$('.Scroller-container').jScrollPane();
});
I've implemented vertical JScrollPane in to a site i'm designing. it displays correctly in Firefox and IE but in Chrome it displays correctly on page load and when accessing other links that have the scroller on.
However, if I simply refresh the page the scrollbar vanishes.
Any help would be greatly appreciated!
- jScrollPane -v2.0.0beta4
- Jquery - v1.4.2
- chome - v6.0.4
HTML:
<div id = "right_left">
<div class="Scroller-container">
... php foreach displaying list of images ...
</div>
</div>
CSS:
#right_left{
margin-top:10px;
width:145px;
padding-left:20px;
}
.Scroller-container{
width: 100%;
height:800px;
overflow:auto;
}
.jspVerticalBar
{
left: 0;
}
JS+Includes:
<link href="<? echo base_url(); ?>/css/style.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
<script type="text/javascript" src="<? echo base_url(); ?>/scripts/jquery.em.js"></script>
<script type="text/javascript" src="<? echo base_url(); ?>/scripts/jqModal.js"></script>
<link type="text/css" href="scripts/jScrollPane/style/jquery.jscrollpane.css" rel="stylesheet" media="all" />
<script type="text/javascript" src="scripts/jScrollPane/script/jquery.mousewheel.js"></script>
<script type="text/javascript" src="scripts/jScrollPane/script/jquery.jscrollpane.min.js"></script>
$(document).ready(function(){
$(function()
{
$('.Scroller-container').jScrollPane();
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是由包含加载缓慢的图像的导航框引起的。滚动条需要重新初始化。我通过使用以下 Js,特别是 Autoreinitialise 参数来完成此操作:
$('.Scroller-container').jScrollPane
({
显示箭头:true,
自动重新初始化:true
});
This was caused by the navigation box containing images that were loading slowly. The scroll bar needed to be reinitialised. I did this by using the following Js, specifically the Autoreinitialise param:
$('.Scroller-container').jScrollPane
({
showArrows:true,
autoReinitialise: true
});
试试这个:
Try this:
非常感谢亚伦。我遇到了同样的问题,滚动条在谷歌浏览器中不起作用。但是当我使用以下代码时它可以正常工作
Thank you very much Aaron. I faced the same problem, scroller was not working in google chrome. But when I have used the following code it's working properly