我面临一个问题,当用户点击文本字段时,我的它们会上升吗?我使用的是查询手机1.3。这也是我的问题。为什么在文本字段中输入文本时主题会向上?
解决方案jQuery Mobile响应面板和文本区域我使用了这个解决方案,但没有得到正确的结果。这是我的手机1.3 jshttp://jsfiddle.net/fMWnz/
在哪一行我应该改变,这样它将工作
(function(root, doc, factory) {
if (typeof define === "function" && define.amd) {
// AMD. Register as an anonymous module.
define(["jquery"], function($) {
factory($, root, doc);
return $.mobile;
});
} else {
// Browser globals
factory(root.jQuery, root, doc);
}
}(this, document, function(jQuery, window, document, undefined) {
(function($) {
$.mobile = {};
}(jQuery));
(function($, window, undefined) {
var nsNormalizeDict = {};
这是您的答案。。window.resize由于虚拟键盘导致jquery移动出现问题
1) Go into jquery.mobile-1.x.x.js
2) Find $.mobile = $.extend() and add the following attributes:
last_width: null,
last_height: null,
3) Modify getScreenHeight to work as follows:
getScreenHeight: function() {
// Native innerHeight returns more accurate value for this across platforms,
// jQuery version is here as a normalized fallback for platforms like Symbian
if (this.last_width == null || this.last_height == null || this.last_width != $( window ).width())
{
this.last_height = window.innerHeight || $( window ).height();
this.last_width = $(window).width();
}
return this.last_height;
}