On 20 February 2011 14:21, jeremy <[email protected]> wrote:
> Hey everybody,
>
> I want to apply a scriptaculous toggle effect to a div, but I do not
> want the effect to impact the full div...
>
> I try to be a bit clearer :
>
> I have a div, with a variable height of, let's say, for example,
> 1000px.
> I want the div to be "half-hidden" : when the page is loaded I want to
> see a 400px height
> Then I click on a link "show the full div", and the hidden 600px are
> shown
>
> It would be quite simple with 2 divs, one of 400px and one of 600px
> with a toggle effect - but I MUST use one unique div
>
> Is it possible?
>
> Thank you VERY MUCH for your help.
>
> Jeremy


A top-of-my-head suggestion  ...

Rather than toggling visibility, how about 2 CSS classes?

The first class (and the one assigned to the div in the HTML) would
reflect the initial state.

An onclick handler could then use an addClass() to add in the CSS
class that reflects the full height.

I guess the second CSS class would have ...

height:inherit;

maybe.






-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to