I want to add a comma after copy pasting string into input
$("#keywords").bind('paste', function() {
var a=$("#keywords").val();
alert(a);
});
I tried the above code to check if the pasted value is passed into variable. In alert it is displaying empty value. How can i know if the value of the pasted string is passed into variable and then append comma to the variable.
Here is the fiddle