Jquery 虚拟键盘上的phonegap ios固定输入字段
'我正在使用jquery Mobile创建phonegap应用程序。在我的应用程序中,一个固定的输入字段出现在虚拟键盘的顶部,这在android中可以正常工作,但在IOS中,当虚拟键盘出现时,它就不工作了 我的问题比这个小 jsJquery 虚拟键盘上的phonegap ios固定输入字段,jquery,ios,cordova,jquery-mobile,phonegap-plugins,Jquery,Ios,Cordova,Jquery Mobile,Phonegap Plugins,'我正在使用jquery Mobile创建phonegap应用程序。在我的应用程序中,一个固定的输入字段出现在虚拟键盘的顶部,这在android中可以正常工作,但在IOS中,当虚拟键盘出现时,它就不工作了 我的问题比这个小 js header_height = $('.main-header').height(); footer_height = $('.footer').height(); footer_input_height = $('.fixed_bottom').height();
header_height = $('.main-header').height();
footer_height = $('.footer').height();
footer_input_height = $('.fixed_bottom').height();
$('.fixed_bottom').css('bottom',footer_height+'px');
$('#messages .ui-panel-wrapper').css('padding-bottom','inherit');
$("input, textarea").blur(function() {
$("[data-role=footer]").show('','',function(){
$('#messages').css('padding-bottom',footer_height+'px');
$('#messages .ui-panel-wrapper').css('padding-bottom','inherit');
$('.fixed_bottom').css('bottom',footer_height+'px');
});
});
$("input, textarea").focus(function() {
$("[data-role=footer]").hide('','',function(){
$('#messages').css('padding-bottom','0px');
$('#messages .ui-panel-wrapper').css('padding-bottom','0px');
$('.fixed_bottom').css('bottom','0px');
});
})
CSS
#messages .fixed {
left: 0;
right: 0;
width: 100%;
position: fixed;
z-index: 1000;
display: block;
}
#messages .fixed_bottom {
bottom: 0px;
}
android中的屏幕截图
Iphone中的屏幕截图