In this jQuery, I'm able to bind the paste event to validate the form field, but my method inside the function is apparently wrong. I'm not getting an alert at all.
I just want to trim the text that's input and return that as the value of the form input text field #adsense_client_id
.
$("#adsense_client_id").bind('paste', function(e) {
$(this).attr('value') = $.trim(this).val();
alert($(this).val()); //why no alert?
});