js解决手机键盘影响定位的问题

// 滑动其他地方隐藏软键盘
document.body.addEventListener('touchend', function(evt) {
document.activeElement.blur();
});
// 解决键盘影响定位的问题
// $(document).ready(function(){
// var h=$(window).height();
// $(window).resize(function() {
// if($(window).height()<h){
// $('.mui-poppicker').hide();
// }
// if($(window).height()>=h){
// $('.mui-poppicker').show();
// }
// });
// });

// $('.mui-poppicker')为定位的div框!

posted @ 2017-08-05 18:54  永往  阅读(456)  评论(0编辑  收藏  举报