简体   繁体   中英

Hide keyboard on blur

I have a form with a few text fields followed by a couple of radio buttons formatted inside a JQM control group. When a user types in the text box, the phone's default keyboard appears (as it should). But when the user clicks on the first radio control group (and presumably the text box looses focus) the keyboard remains visible. Is there a way to hide it?

Try it like,

// you can make a common class and use it as selector
$('input[type="radio"]').on("click",function(){
   $('input').blur();// trigger blur event from all inputs.
});

Hope this will work for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM