Hi,
I think that every body has understand, but there is no way to do $
('elem').click() on FF.
This work on IE, and simulate a real click on the element, but it's
not (I don't think !) in standard.
And thanks, because I did not know it works in Safari.
so you should have to use a tricks to use it.
If you like such a function, try to create your own, and extend the
element !
--
david
On 4 fév, 03:13, solidhex <[email protected]> wrote:
> I should try asking this another way, because I dont think I was clear
> before.
>
> Is it possible to emulate the click() method that IE and Safari 3 seem
> to support using Prototype?
>
> I
>
> On Jan 30, 4:08 am, Радослав Станков <[email protected]> wrote:
>
> > Firing native events like click and others is not available.
> > You can try with custom events -http://www.prototypejs.org/api/element/fire
> > ( unfortunately, there isn't much documentation on the official site :
> > ( , but google helps in this case)
>
> > or use this hack witch jdalton wrote here :http://pastie.org/255119
>
> > Element.addMethods({
> > fire: Event.fire.wrap(function(proceed, element, eventName, memo)
> > {
> > element = $(element);
> > var w, event, eventID;
> > $w(eventName)._each(function(name) {
> > // use original "fire" if it's a custom:event
> > if (name.include(':'))
> > return proceed(element, name, memo);
>
> > // handle native events
> > eventID = (element._prototypeEventID || [null])[0];
> > if (!eventID || !(w = Event.cache[eventID][name])) return
> > false;
>
> > // poor man's event object
> > event = Event.extend({ });
> > event.eventName = name;
> > event.memo = memo || { };
>
> > // execute event wrappers
> > w._each(function(wrapper) { wrapper(event) });
> > });
> > return element;
> > })
> > });
>
> > p.s. This $(ement).fire('click') must be in the core I think, but
> > don't have enough free time lately to fire a ticket
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---