Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript error with Tiny Scrollbar

I added TinyscrollBar to my Wordpress site, and I'm getting the following error when the page loads:

oViewport.obj[0] is undefined

I made sure that I first included the tinyscrollbar.js file, and only then do I make the call

                if (jQuery('#execphp-3 div')){
                    jQuery('#execphp-3 div').tinyscrollbar();
            }

What could be the problem that's causing the error?

EDIT: The HTML that the tinyscrollbar is running on:

<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">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
like image 431
Lea Cohen Avatar asked Dec 12 '22 11:12

Lea Cohen


1 Answers

Just want to add: dont forget to add "scrollbar" and "viewport" elements inside the scrollable content as that can triger the same error.

Cheers!

like image 61
Trython Avatar answered Dec 30 '22 15:12

Trython