我将 TinyscrollBar 添加到我的 Wordpress 网站,当页面加载时出现以下错误:
oViewport.obj[0] is undefined
我确保我首先包含了 tinyscrollbar.js 文件,然后才进行调用
if (jQuery('#execphp-3 div')){
jQuery('#execphp-3 div').tinyscrollbar();
}
导致错误的问题可能是什么?
编辑:运行 tinyscrollbar 的 HTML:
<li class="widget-container widget_execphp" id="execphp-3">
<h3 class="widget-title">Talking NanoChannels</h3>
<div class="execphpwidget">
<div id="scrollbar1">
<div class="scrollbar" style="height: 347px;">
<div class="track" style="height: 347px;">
<div class="thumb" style="top: 90.8106px; height: 256.189px;">
<div class="end">
</div>
</div>
</div>
</div>
<div class="viewport">
<div class="overview" style="top: -123px;">
<ul class="wrap masoned" id="simplepie" style="position: relative; height: 683px;">
<li title="" class="box col1" style="position: absolute; left: 0px; top: 0px;">
<h4>
<span class="twitter"></span>
<a href="http://twitter.com/EreiItamisy/statuses/87518699866701825"> 5th International Conference on Nanochannels, Microchannels, and Minichannels: Puebla, Mexico - June 18-20, 2007: http://amzn.to/jutpBp</a> </h4>
<span class="corner"></span>
</li>
</ul>
</div>
</div>
</div>
</div>
</li>