PDA

View Full Version : Help with Javascript scroller



kimikai
07-05-2013, 11:34 AM
Hey guys,

I hope I'm posting at the right forums
but I have a website online at the moment and I'm facing some difficulties with the Javascript scroller I have on my content div.
I'm using Jscroller for it and I thought I had implemented everything right, but as of now I'm facing problems where, as I put new content inside of that div, it wont scroll till the end of the content anymore. It just sticks somewhere halfway down the page and the rest is unable to get to.

This is an example of a page where I'm facing the problem: http://www.yuhuangshangdis.nl/YuHuang%20Nederlands/tweetwaalf.html

This is the .js for the scroller, the problem should be somewhere in there but I'm really struggling with javascript...
5130

can anyone figure out what I should do to make it scroll anytime...regardless of howmuch content I place inside the div?

Thanks ;)

P.S. If you guys need anything more to help me out, I'll be glad to upload it

Beverleyh
07-05-2013, 02:44 PM
Can you post a link to the jscroller script's website please - the source website with demo and installation instructions so we have a comparison.

jscheuer1
07-05-2013, 04:38 PM
How are you putting new content in there? It could just be that this:


<script>
$(function()
{
$('#contentinside').jScrollPane();
});

</script>



is happening too soon for some browsers. Change it to:


<script>
$(window).load(function(){$('#contentinside').jScrollPane();});
</script>



The browser cache may need to be cleared and/or the page refreshed to see changes.

kimikai
07-05-2013, 05:23 PM
to get back at your question on how I add new content, I just put new content in the div #contentinside that has an overflow:hidden to it...
buuuut I changed the code from what I had to what you gave as an option and it works like a charm :)
sooo thanks alot!
I guess you were right about it just happening too soon for the browsers and therefor it wasnt loading the way it was supposed to