I’ve searched a bit, but I’m not sure how to write the question to find the answer I want.
Given the following jQuery snippet:
$('input').blur(function(e){
//can i get $('input') from within e?
$('input').val('');
});
How can I re-use the $('input') selector – typically it’s available within this ?
Within your callback
thisis the dom element and$(this)is the jQueryified dom element.Unless you’re using e somewhere else I think this would work: