Simple answer is there's no defined HTML event for "arrival" as you
You might try using Function#delay to simulate it. Something to the
effect of:

var arrival_function_reference = function(a, b, c ,d){ ... };

    arrival_function_reference.delay(0.5, any, args, you, need); //
Whatever time delay you think appropriate

Or if you wanted it to feel more "fluid" you could stick
Effect.ScrollTo from Scriptaculous into the click observer:

    event.stop(); // Prevent the default Event from going to the href
    Effect.ScrollTo('destination_a', {duration:0.5}); // Whatever time
delay you think appropriate
    arrival_function_reference.defer(any, args, you, need);

In this case use defer to make your arrival function wait until
Javascript has finished scrolling the document to the destination.
Completely untested, but maybe it helps get you started.
-joe t.

On Jan 7, 7:37 pm, tmarin <> wrote:
> I want to execute some code when a user reaches a fragment anchor (the
> # part of a link), is there any event for this?
> Thanks in advance
> tmarin
You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to