On Oct 24, 2008, at 7:08 AM, palgo wrote:

>
> Ok, it was kind of difficult to write a short title, so I'll explain
> it better here.
>
> I have a photolog where I use script.aculo.us. Currently I have a
> comment section below the main photo which slides out and in with
> effect.toogle, like this:
>
> <a href="#" onclick="Effect.toggle('image-comments','SLIDE'); return
> false;">
>
> So my problem is that this works fine - the comment section slides
> down and up perfectly. But, when the comment section slides out, i
> have to manually scroll the page so that the comment section is
> displayed. This is a bit annoying.
>
> So I was wondering how I could modify the code to get it to
> automatically scroll the page up and place the comment section in the
> viewable area of the browser window.
>

Take a look at the afterFinish option to Effects. That will get you  
the hook you need to call the scroll effect after the animation has  
finished. Then you can take your choice of Prototype/Element#scrollTo  
or script.aculo.us/Effect#ScrollTo (which has easing and other  
cartoon physics niceties).

Walter


--~--~---------~--~----~------------~-------~--~----~
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 prototype-scriptaculous@googlegroups.com
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