I read that the new delegate method can attach more than one event to a handler however I have not see this in practice. Would anyone type a code for this please.
I tried:
$("body").delegate("input", "mouseup", "mouseover", function() {
$(this).after("<p>Another paragraph!</p>");
});
and it appended the paragraph only on mouseup. I am confused.
Use a space delimiter for events like this:
You probably meant to select
<input>elements, I changed this above, correct me if you meant otherwise.Alternatively, use
.bind()like this:I find this easier to read, but whatever floats your boat.