jQsafi / jscrollpane

Automatically exported from code.google.com/p/jscrollpane
0 stars 0 forks source link

Hiding/showing child elements wont recalculate the scroll height. #196

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Inside your scrollable div container, place any display:none element.
2. Initialize jScrollPane on doc load.
3. Change the display:none of the child element to display:block.

What is the expected output? What do you see instead?
It should recalculate the height of the parent box (scrollable box) and add 
the height of the new displayed element. Even running a callback function 
doesn't do the trick:

$('#some_child').show(0, function(){ $('#parent').jScrollPane(); });

The scrollbar just stays the same.

What version of the jScrollPane are you using? On what browser? And 
operating system?
jScrollPane 1.2.3
jQuery 1.4.2
Windows 7
Google Chrome 4.1, Firefox 3.6.3, IE8

Please provide a URL to a page displaying the problem.

Please provide any additional information below.
<div id="parent" style="widht:100px; height:100px">
  <div id="some_child" style="display:none; height:500px">Woot!</div>
</div>

Original issue reported on code.google.com by dher...@gmail.com on 21 May 2010 at 6:05

GoogleCodeExporter commented 9 years ago
I have the same problem. Only I set the div to display:inline;
Any solutions for this ?
Thanks

Original comment by cfconsul...@gmail.com on 27 Jul 2010 at 9:18

GoogleCodeExporter commented 9 years ago
Solved my problem. I use some collaps js functions.
When collapse is initiated I add
$('#scrolldiv').jScrollPane({showArrows:true, reinitialiseOnImageLoad: true, 
scrollbarWidth:10});
and it works

Original comment by cfconsul...@gmail.com on 28 Jul 2010 at 11:13

GoogleCodeExporter commented 9 years ago
I have just announced the beta of a completely rewritten version of jScrollPane:

http://groups.google.com/group/jscrollpane/browse_thread/thread/c1bc1bf63e3f80d8

Please test and reply on the list if you are still having this issue,

Thanks,

Kelvin

Original comment by kelvin.l...@gmail.com on 17 Aug 2010 at 4:20