I am trying to display whatever a user copies when using IE. Im using jquery and the following code:
$('#data').bind("copy", function(e) {alert(clipboardData.getData("text"));})
The problem is whenever I copy it shows the data previously copied. not the current data showing the function is called before the data is put on the clip board. is there any workaround
I think what you want is to get the selected text. See below code to get the text selection,
DEMO
Reference:
How to get selected text from textbox control with javascript