Ciprian
Ciprian

Reputation: 3226

Style scrollbar with jScroll

I ve been trying to style some scrollbars with jScroll on a theme I installed for a friend, but it's returning

Uncaught TypeError: Cannot read property 'offsetHeight' of undefined 

I tried another jQuery plugin called tinyScrollbar and it's doing the same. I m ! sure what the problem =. I can change it with CSS but it won't work in Firefox which = really annoying. Any ideas why it won't work?

Url: http://spicyjentertainment.com/welcome.html

This = the div that = suppose to scroll

<div class="wrapper" id="scrl">

And the CSS

#scrl {
    height:150px;
    overflow:hidden;

}
#scrl:hover {
    overflow-y:auto;
}

EDIT

var initDrag = function()
            {
                ceaseAnimation();
                currentOffset = $drag.offset(false);
                currentOffset.top -= dragPosition;
                maxY = trackHeight - $drag[0].offsetHeight;
Uncaught TypeError: Cannot read property 'offsetHeight' of undefined
                mouseWheelMultiplier = 2 * settings.wheelSpeed *     maxY / contentHeight;
            };

Upvotes: 2

Views: 2062

Answers (1)

Baijs
Baijs

Reputation: 1847

tinyscrollbar needs a div structure to be present.. You only have 1 wrapper div. read the instructions.

    <div id="yourscrollbar">
    <div class="scrollbar"><div class="track"><div class="thumb"><div class="end"></div></div></div></div>
    <div class="viewport">
        <div class="overview">

tekst..



        </div>
    </div>
</div>

Upvotes: 1

Related Questions