Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Div doesn't display when using jScrollPane()

This should be exceedingly simple, but here goes. I have a simple div container that gets populated by a Twitter feed (jTweetsAnywhere):

<div id='twitter-feed'></div>

This functionality works fine and gives me a simple container with a Twitter feed, with overflow:auto. Again: works fine, overflow is scrollable with the standard ugly scrollbar.

After loading jquery.jScrollPane.min.js, jquery.scrollpane.css, jquery.mousewheel.js, and mwheelintent.js, and initializing like so:

$(document).ready(function(){
    . . .
    $("#twitter-feed").jScrollPane();
});

...the #twitter-feed div no longer displays, and no runtime error is thrown.

Thoughts?

like image 349
hannebaumsaway Avatar asked Jul 26 '26 06:07

hannebaumsaway


1 Answers

My initial guess is that .jsScrollPane() is getting called long before jTweets returns anything. This means that there is a good chance that it is setting the height of the container while its empty, so it probebly is set to 0. Have you tried to give #twitter-feed a static height?

like image 103
Skylar Anderson Avatar answered Jul 27 '26 22:07

Skylar Anderson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!