Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
128
rated 0 times [  129] [ 1]  / answers: 1 / hits: 17649  / 11 Years ago, thu, september 12, 2013, 12:00:00

My code is below:



$('.summaryT').keypress(function(e){
if(e.which == 13){
callajax();
$(this).focusout();

}
});


As you can see on the code above, When a user presses the enter key first callajax() is run(working fine). After that I want to focus out from the .summaryT input box, How can I achieve this?


More From » php

 Answers
18

Try this



$('.summaryT').keypress(function(e){
if(e.which == 13){
callajax();
$(this).blur();
}
});

[#75739] Wednesday, September 11, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
yaquelina

Total Points: 517
Total Questions: 101
Total Answers: 96

Location: Egypt
Member since Tue, Jul 6, 2021
3 Years ago
;