Skip to content
Advertisement

Tag: live

Simple version of jQuery live function

Is it possible to get anywhere a pure Javascript function for event handler with similar functionality as jQuery’s live() ? I need to have the ability to attach events to objects not yet created but both jquery-livequery as well as jquery-events sources are not useful due to dependencies on jQuery core. Answer Event delegation is quite simple. Take this example:

Advertisement