我使用Phonegap和jQuery Mobile设计了一个应用程序.固定页脚正常工作,直到我点击下拉列表或文本字段,这会导致页脚从视图中消失(Android 4.0)或移动到视图的中间(Android 2.2 Galaxy Tab).有什么建议?
Phonegap版本:Cordova 2.1.0
jQuery Mobile版本:1.2.0
这是我的代码:
<div data-role="footer" class="nav-mobilyzer" data-tap-toggle="false" data-position="fixed">
<div data-role="navbar" class="nav-mobilyzer" data-grid="d">
<h1>footer</h1>
</div>
</div>
Run Code Online (Sandbox Code Playgroud) 我已经使用jquery ajax从服务器获取值.当方法进入ajax成功或错误时,我需要返回值.如何做到这一点.请指导我.
$.ajax({
cache: false,
async: true,
type: "GET",
timeout:6000,
dataType: "json",
url:url +"log",
data: { ContactEmail : $("#username").val()},
contentType: "application/json;charset=utf-8",
success: function (result)
{
//Here I need to return the result and should get in another method
},
Error: function (e)
{
//Here I need to return the result and should get in another method
}
});
Run Code Online (Sandbox Code Playgroud)
更新
例如, 当我调用checkNetConnection()时,它返回 value.i需要这样
function checkNetConnection()
{
var netresult=0;
var networkState = navigator.network.connection.type;
var states = {};
states[Connection.UNKNOWN] = …Run Code Online (Sandbox Code Playgroud)