thumblewend wrote:
> 
> If you add:
> height:375px;
> 

Hi, thanks for your replies. Unfortunately I can't set the div height to
375px in the CSS because I want that to be the minimum height (I mean I
could set it as min-height in the CSS but then I'd have problems with IE).


thumblewend wrote:
> 
> 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.
> 

What's the best way to get around this? Should I try re-applying the height
value after the animation has finished?


thumblewend wrote:
> 
> Also, if you put a reference to the div the navigation links are  
> targeting, like this:
>  #test1 Previous Articles 
> 
>   not only would you increase accessibility, but you could then  
> optimise your entire code down to just this:
> 
> $(function() {
>       $('#demo-show > div').hide();
>       $('#navigation a').click(function(){
>               
> $(this.hash).slideToggle('slow').siblings('div:visible').slideUp 
> ('fast');
>       });
> });
> 
> You could possibly (depending on if you need them for other reasons)  
> also remove the id from the nav links too.
> 
> Untested. If anyone sees an error, please point it out.
> 
> Joel.
> 

Thanks. :)


On 23/02/2007, at 4:24 PM, Yansky wrote:

> 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');
>       });
> });


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/



-- 
View this message in context: 
http://www.nabble.com/Losing-height-value-tf3277136.html#a9114712
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to