And why is .on() now preferred in jQuery 1.7?
The old method was a bit messy - the difference between live()
, delegate()
and bind()
was not clear. By making on()
the function that handles attaching any event, regardless of whether it exists or not, it's just easier to work with.
Before now, live()
was a lot slower than the new on()
function, hence why you had to choose between bind()
and live()
.