I have binded blur on an input. On blur, I want to use $(this)
and detect this input. Is there a way to do that?
<input data-john="x" data-doe="false">
$('[data-john=x]:not([data-doe=true])').blur(function() {
console.log($(this))
})
In this example, $(this)
is returning Window, not the blurred element.
Is there a way to get input using $(this)
?