CSS3 transitions have this issue too, so it would be great if Scripty
could come up with a way around it.
Trying to morph to 'height:auto' does nothing, whereas putting 'height:
240px' or similar works. Wehn you have several different height divs,
this can be a problem.
My code is:
elemHeight = parseInt($(elemId).getStyle('height'));
if(elemHeight == 0){
$(elemId).morph('height:auto;');
} else {
$(elemId).morph('height:0;');
}
This is essentially to do an accordion-type movement - I know there is
a separate Accordion' effect, but I can't use it in this instance.
Is there a way to make 'height:auto' work, without a long-winded way
of working out the actual height of the div and feeding in a number?
Chris
--
You received this message because you are subscribed to the Google Groups "scripty2" group.
To post to this group, send email to scri...@googlegroups.com.
To unsubscribe from this group, send email to scripty2+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scripty2?hl=en.
I was wondering whether it would be necessary to find the required
height and morph to it - I know that CSS3 transitions have a similar
problem if you try and transition to height:auto.
I think it would be a great feature to have Scripty automatically
deduce the 'auto' height of the div - I might work on a workaround for
it (if I can find the time...)
Chris
> On 12 February 2010 17:35, Chris <chris5ma...@gmail.com> wrote:
>
>
>
>
>
> > Hi,
>
> > CSS3 transitions have this issue too, so it would be great if Scripty
> > could come up with a way around it.
>
> > Trying to morph to 'height:auto' does nothing, whereas putting 'height:
> > 240px' or similar works. Wehn you have several different height divs,
> > this can be a problem.
>
> > My code is:
>
> > elemHeight = parseInt($(elemId).getStyle('height'));
> > if(elemHeight == 0){
> > $(elemId).morph('height:auto;');
> > } else {
> > $(elemId).morph('height:0;');
> > }
>
> > This is essentially to do an accordion-type movement - I know there is
> > a separate Accordion' effect, but I can't use it in this instance.
>
> > Is there a way to make 'height:auto' work, without a long-winded way
> > of working out the actual height of the div and feeding in a number?
>
> > Chris
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "scripty2" group.
> > To post to this group, send email to scri...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > scripty2+u...@googlegroups.com<scripty2%2Bunsu...@googlegroups.com>
Best,
Thomas
2010/2/17 Иван Жеков <jon...@gmail.com>: