ScrollTo - toggle between min-height/fixed height
Posted
by Skoder
on Stack Overflow
See other posts from Stack Overflow
or by Skoder
Published on 2010-05-06T17:05:23Z
Indexed on
2010/05/06
17:08 UTC
Read the original article
Hit count: 326
Hi everyone,
I'm trying to use the ScrollTo plugin, but I can't seem to get it working properly. I tried to view the source at the site I linked to but I'm trying to achieve something slightly different. I would like the window pane to change size according to the content (so the height would increase for longer text and would decrease for shorter text). However, when I supply a min-height
(as opposed to a fixed height), the pane automatically changes to the maximum height when the page is loaded. So if I have something set to margin-top:1000px;
, the pane will be 1000px in size regardless of what tab is currently displaying. The fix would be to use height
instead, but that would mean that the window won't expand in height and the user would have to scroll.
I got my code from viewing the source on the ScrollTo page, but I also tried this tutorial code.
Thanks for any help
© Stack Overflow or respective owner