首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >图像填充内容的jScrollPane

图像填充内容的jScrollPane
EN

Stack Overflow用户
提问于 2012-05-05 19:03:12
回答 1查看 148关注 0票数 0

在我的网站上:www.Industrial a.be/verkiezingen/infinity/www/

我在屏幕中间做了一个内容窗格。我正在调用jScrollPane来处理故意溢出。这在主页/团队和日历页面上运行得很顺利,但是赞助商页面有问题。此赞助页面包含相同的容器,但在这里它是填充图像。虽然jScrollPane函数调用是相同的,但它在这里不能正常工作。有时滚动条不会出现,或者无法滚动到容器的底部。

我使用的jQuery代码:

代码语言:javascript
运行
复制
$(document).ready(function(){
 $('#content').jScrollPane({
    scrollbarWidth: 10,
    scrollbarMargin: 10,
    dragMinHeight: 50,
    dragMaxHeight: 100,
    showArrows: false   
});});

html:

代码语言:javascript
运行
复制
<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>          

我希望有人能给我解释一下为什么它不能正常工作。提前谢谢。

EN

回答 1

Stack Overflow用户

发布于 2012-05-21 04:02:13

根据您的描述,我建议您在加载图像后使用$(window).load()而不是$(document).ready()初始化滚动窗格。

不久前,我自己也遇到了这个问题的一个变体。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10461196

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档