views:

204

answers:

1

Hi,

I'd like to monitor my textarea's changes with jQuery. I can do this with the keyup event and it works perfectly. But what event I can get when a user click on the textarea (right mouse click), then choose paste?

Click event occur only when the user click with the left mouse button on the textarea.

How can I handle this situation?

+2  A: 

you can detect Pastes or Cuts into the textarea by:

$("#TextBox1").bind('paste', function(e) {
            alert('pasting text!');
        });
$("#TextBox1").bind('cut', function(e) {
            alert('cut text!');
        });

Or combine:

$("#Text1").bind('cut paste', function(e) {
    alert(e.type + ' text!');
});
Glennular
It doesn't work for me. But it's close, so I'll accept it. The right answer : $("#TextBox1").bind('input paste', function(e) {...});
Colby77