I have an input
field that will cache its value
attribute. Example:
$("#signUpEmail").keyup(function(e) {
console.log(e.target.value); // Works
console.log($(this).attr("value")); // Doesn’t work
});
If I log them both in the console, e.target.value
will return my input
field, but not $(this).attr("value")
. Can anyone explain why that is?