jQuery jScrollPane - it simply won't work! :'(
Posted
by Jack Webb-Heller
on Stack Overflow
See other posts from Stack Overflow
or by Jack Webb-Heller
Published on 2010-05-09T13:11:02Z
Indexed on
2010/05/09
13:18 UTC
Read the original article
Hit count: 381
Hey folks,
OK - I'll admit, I'm quite a beginner in this jQuery-department. I've probably made some amateur mistake, but hey, you gotta learn somewhere! :)
So I'm using jScrollPane: http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html
I want to use it style the scrollable area in my second column. Specifically, I would like to apply and format the scrollbars on the div #ajaxresults
My page is... rather jQuery heavy. I don't know if any variables are conflicting or something... in fact I really have no idea at all why this isn't working.
Take a look at my problematic page: http://furnace.howcode.com
In the header, I've set this to go:
<!-- Includes for jScrollPane -->
<script type="text/javascript" src="http://localhost:8888/js/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="http://localhost:8888/js/jScrollPane.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="http://localhost:8888/stylesheets/jScrollPane.css" />
<script type="text/javascript">
$(function() {
$('#ajaxresults').jScrollPane();
});
</script>
(I've changed localhost on the server copy though)
Nothing ever seems to work with the #ajaxresults div. I've set, as the jScrollPane docs say, overflow:auto
on it but still no luck. I find that when jScrollPane DOES seem to 'run' it just moves the div down about 100 pixels. Try it for yourself.
Perhaps someone could help? There's quite a few jQuery plugins there so I don't know if something's colliding/crashing etc...
Please note the site is still in development between myself and a friend, which explains the personal messages we submit to each other ('Hi Donnie!' etc. :D ). Also, when you view the page nothing may appear in the second column for a few seconds - it's just fetching the data via Ajax. So give it a little time.
Thanks very much!
Jack
© Stack Overflow or respective owner