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
Comments
In f493bd5 I swapped out With |
mworrell
added
enhancement - later
and removed
enhancement
labels
Apr 22, 2015
mworrell
added this to the Enhancements for later milestone
Apr 22, 2015
mworrell
closed this
Apr 22, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mmzeeman commentedMar 15, 2013
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().