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

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

$('source_a").observe('click',
  function(){
    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:

$('source_a").observe('click',
  function(event){
    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 <teimat...@gmail.com> 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 & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to