Reputation: 159
I have a function that is executed when a textbox gains focus and another function when it loses focus. problem is i dont know where to attach the function for the lost focus event. For the focus i am using
$(" :input[class='Txtbox']").focus(function(){
$(this).val("");
});
Upvotes: 0
Views: 208
Reputation: 10653
Use the `blur' event handler. Then in the callback do anything you want (i'm sure you that already):
$(" :input[class='Txtbox']").blur(function(){
// Do Something...
});
Upvotes: 1
Reputation: 5265
Use blur
event.
$(" :input[class='Txtbox']").blur(function(){
//do something
});
Upvotes: 3