Search code examples
jqueryscrollbarpage-refresh

jQuery Tiny Scrollbar plugin - Fails to show all content on refresh


I've implemented Tiny Scrollbar plugin on a website, for good-looking div scrolling. But weird stuff happens when I refresh the page in Safari or Chrome. It seams to clip some of my content. What happens upon a page refresh, that could make it behave like this? Please have a look at mettestentoft.dk

I've tried using the same plugin on a simple test page, where a page refresh would make the plugin add a 'scrollbar disable' class to the div, while clicking a link linking to the same page, would make i show as it should.

Tiny Scrollbar plugin demopage doesn't seem to have any problems, unless I'm missing it.

So my question is: Do I have to do something jQuery-wise, in order for a page to load equally to a linked page?

Thank you in advance :)


Solution

  • How are you initializing the Scrollbar plugin? is it $('#cases_container').tinyscrollbar();?

    Remove the set height of the #cases_container div.

    Nodo.css line: 101.

    #cases_container {
        /*height: 383px;*/
        width: 550px;
        /*overflow-x: hidden;*/
        /*overflow-y: hidden;*/
        /*position: relative;*/
        /*top: -200px;*/
        /*left: 250px;*/
    }
    

    I'm assuming doing this will screw up it positioning on the page so create another container div that applys all the relative positions etc. but leave the overflow hidden out of it.