If you add:
height:375px;
to your CSS file for the selector:
#demo-show div
It works. Then you can remove the javascript for setting the height
to 375 completely. The reason this is so is that the animation
removes the 'height' from the inline 'style' attribute upon
completion so that the element is still flexible if the contents is
reflowed. If the height is set in the actual CSS then this is not
altered or removed when the inline style attribute is altered.
Hope this is a viable change for what you want to do.
Joel Birch.
On 23/02/2007, at 4:24 PM, Yansky wrote:
>
> Hi, for some reason the height value that I am assigning to hidden
> divs is
> being lost once the click function finishes.
>
> This is my code:
> $(document).ready(function() {
> if ($('#demo-show > div').height() < 375)
> {$('#demo-show > div').height(375);}
>
> $('#demo-show > div').hide();
>
> $('#test-click1').click(function() {
> $('#test1').slideToggle('slow').siblings('div:visible').slideUp
> ('fast');
> });
>
> $('#test-click2').click(function() {
> $('#test2').slideToggle('slow').siblings('div:visible').slideUp
> ('fast');
> });
>
> $('#test-click3').click(function() {
> $('#test3').slideToggle('slow').siblings('div:visible').slideUp
> ('fast');
> });
> });
>
> My test page: http://34r34r.dreamhosters.com/newdesign/slidetest.html
>
> Any help would be appreciated.
> Cheers.
> --
> View this message in context: http://www.nabble.com/Losing-height-
> value-tf3277136.html#a9113760
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/