Currently I have
$("#string").bind("keyup keypress paste mouseup", function () {
});
and I ‘d like to replace it with .on() but it doesn’t seem on() accepts many events at the same time?
I tried this:
$("#string").on("keyup", "keypress", "paste", "mouseup", function () {
});
and this:
$("#string").on("keyup keypress paste mouseup", function () {
});
The documentation states that you can definitely use .on() with a space seperated list of events to bind multiple events: link. Which means that your code should work like this:
Here’s a quick JSfiddle… Mouse up definitely works – can’t confirm the other event types though (EDIT Just tried all your events and they definitely work – see the jsFiddle)…