I'm confused about when you should use event delegation as opposed to out-of-the-box JQuery event handling.
I'm always tempted to use an event handler because it's so easy in JQuery:
For example:
$("button#submit").click(function () {
$(this).css("disabled", "true");
});
Event delegation is not really that much more complex to write:
$("button#submit").live("click", function() {
$(this).css("disabled", "true");
});
But it just doesn't seem as intuitive.
Is there a simple rule of thumb about when to use event delegation? I guess I don't really understand the point of it.