Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
jQuery has a more flexible way to bind to events. Could be useful for us. #539
As of jQuery 1.7, the .on() method is the preferred method for attaching event handlers to a document. For earlier versions, the .bind() method is used for attaching an event handler directly to elements. Handlers are attached to the currently selected elements in the jQuery object, so those elements must exist at the point the call to .bind() occurs. For more flexible event binding, see the discussion of event delegation in .on() or .delegate().