You need to use Effect.scrollTo not Element.scrollTo.
See http://wiki.script.aculo.us/scriptaculous/show/Effect.scrollTo

-Thomas

Am 25.04.2006 um 16:54 schrieb Joe Hudson:

I think you're right... I think the documentation might be wrong:
http://wiki.script.aculo.us/scriptaculous/show/Element.scrollTo

I thought I was missing something because I'm no expert but this is the code
I thought it was using which has no mention of a duration:

  scrollTo: function(element) {
    element = $(element);
    var x = element.x ? element.x : element.offsetLeft,
        y = element.y ? element.y : element.offsetTop;
    window.scrollTo(x, y);
  },

Thanks for the response.

Joe

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:rails- spinoffs-
[EMAIL PROTECTED] On Behalf Of Gregory Hill
Sent: Tuesday, April 25, 2006 10:41 AM
To: [email protected]
Subject: RE: [Rails-spinoffs] Element.scrollTo duration isn't working

I thought the duration parameter was only used with Effect functions,
but I could be wrong.

Greg

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:rails-spinoffs-
[EMAIL PROTECTED] On Behalf Of Joe Hudson
Sent: Tuesday, April 25, 2006 8:37 AM
To: [email protected]
Subject: [Rails-spinoffs] Element.scrollTo duration isn't working

Does anybody have any ideas what I am doing wrong?  The duration
parameter
seems to have no effect on the scrollTo function.

Element.scrollTo(divId, {duration: 5.0});

Am I using this correctly?  Thanks.

Joe


_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs




_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to