That sounds like a great solution. So much to learn!!
I did try that as you suggested and nothing happens. I put in some
On Jun 15, 1:20 pm, Loyal Chow <
loyalc...@gmail.com> wrote:
> Actually, using Mojo event delegation would be the fastest, because it
> wouldn't execute any DOM queries until a user interaction happened. Whereas
> using mojo.query (or dojo.query) as the first parameter will execute a query
> on the entire DOM on load of page, which is very slow.
>
> To use event delegation, simply use a string query as the first parameter of
> addObserver, and ensure the event being fired bubbles up (such as onclick,
> onmouseover, etc.). Mojo will do the rest!
>
> Example:
> this.addObserver(".tooltip-trigger", "onmouseover", "ToolTip",
> function(context, caller)...);
>
> Also, a simple string query such as the class selector above is the fastest
>
> Here's some more info on event delegation: