• support@answerspoint.com

Jquery focus out after pressing enter key

1448

My code is below:

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

    }
});

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

2Answer


0

Try this Code

$('.summaryT').keypress(function(e){
    if(e.which == 13){
        callajax();
        $(this).blur();    
    }
});
  • answered 3 years ago
  • B Butts

0

use the jquery blur() event


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

    }
});

 

  • answered 3 years ago
  • G John

Your Answer

    Facebook Share        
       
  • asked 3 years ago
  • viewed 1448 times
  • active 3 years ago

Hot Questions