coughlinsmyalias
2007-Oct-22 13:15 UTC
Working with: Effect.Scroll Vertical and Horizontal
Hi, I am trying to work with http://wiki.script.aculo.us/scriptaculous/show/Effect.Scroll+Vertical+and+Horizontal And am having some troubles, what would be the basic usage of this effect, at the bottom of the page they have: Parameters element - Element object, or a string with ID name options - Object with options Options You can use the standard core effect options, but the to and from options differ a bit: Option To This option is the number of pixels where to scroll to. Note that, if you want to scroll to a specific point, you will have to set the from option to zero, because else, it will scroll down the given number of pixels. So if the user scrolled already a bit down, and you trigger the scroll event without the from option, it will scroll down from the point where the user were on your page. You can give also a negative value, to scroll up. Option From This option determines where to scroll from. --------------------------------------------------------------------------------------------- I am confused on what I use for options? to and from? How would I set up my HTML, my goal is to get it to scroll to an anchor, I have: <a href="#" onclick="new Effect.ScrollHorizontal?(''content'', {duration:.2});">SlideDown Now!</a> <div id="content"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </div> Thank you so much, Ryan Coughlin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---