Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Live event handlers?

#401

Does RightJS implement some form of live events handlers? Example: http://api.jquery.com/live/ .

Basically the idea is that it allows you to bind events to handlers in a more generic manner. You don't have to care about actual element any more. It effectively decouples element creation from binding.

I would expect a syntax along this to work:
$$().live(, , )

Let me know if there's something like this already. :)

Reported by Juho Vepsäläinen · November 9th, 2010 @ 10:58 AM

State: resolved
Milestone: none
Assigned to: nobody

Activity

  1. Juho Vepsäläinen
    Juho Vepsäläinen

    Great. It chomped my example!

    Let's try again:
    $$('CSS selector').live('DOM event name', handler, additional parameters)

    November 9th, 2010 @ 11:00 AM

  2. MadRabbit
    MadRabbit
    • State changed from new to resolved
    • Tag cleared.

    It's called unobtrusive javascript, or UJS for short

    http://rightjs.org/tutorials/events-delegation

    November 10th, 2010 @ 02:16 PM

  3. Juho Vepsäläinen

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.