在我的网站上:www.Industrial a.be/verkiezingen/infinity/www/
我在屏幕中间做了一个内容窗格。我正在调用jScrollPane来处理故意溢出。这在主页/团队和日历页面上运行得很顺利,但是赞助商页面有问题。此赞助页面包含相同的容器,但在这里它是填充图像。虽然jScrollPane函数调用是相同的,但它在这里不能正常工作。有时滚动条不会出现,或者无法滚动到容器的底部。
我使用的jQuery代码:
$(document).ready(function(){
$('#content').jScrollPane({
scrollbarWidth: 10,
scrollbarMargin: 10,
dragMinHeight: 50,
dragMaxHeight: 100,
showArrows: false
});});html:
<div id="content">
<h1>Our sponsors:</h1>
<a href="http://www.mydigipass.com/"
target="_blank"><img src="img/myDIGIPASS-logo.png"
alt="" width="650" height="152" class="sponsorbalk"/></a></br>
<a href="http://www.dvs-entertainment.be"
target="_blank"><img src="img/DVS-entertainment.png"
alt="" width="250" height="125" class="sponsor"></a>
<a href="http://winter.skikot.be/"
target="_blank"><img src="img/skikot.png"
alt="" width="284" height="140" class="sponsor"></a>
<a href="http://www.imec.be/"
target="_blank"><img src="img/imec.png"
alt="" width="250" height="172" class="sponsor"></a>
<a href="http://www.poweruser.be/"
target="_blank"><img src="img/poweruser_black.jpg"
alt="" width="400" height="217" class="sponsor"></a>
<a href="http://www.delibere.be/new_design/index.php"
target="_blank"><img src="img/de.png" alt=""
width="225" height="50" class="right sponsor"></a>
<a href="http://www.groept.be/www/"
target="_blank"><img src="img/GroepT.png"
alt="" width="180" height="180" class="left sponsor"></a>
<a href="http://guldendraak.be/"
target="_blank"><img src="img/gulden-draak.png"
alt="" width="106" height="106" class="sponsor"></a>
<div id="sponsors">
<p>We would like to thank all of the above sponsors for their co-operation and support to our team.</p>
</div>
</div> 我希望有人能给我解释一下为什么它不能正常工作。提前谢谢。
发布于 2012-05-21 04:02:13
根据您的描述,我建议您在加载图像后使用$(window).load()而不是$(document).ready()初始化滚动窗格。
不久前,我自己也遇到了这个问题的一个变体。
https://stackoverflow.com/questions/10461196
复制相似问题