【发布时间】:2011-11-03 22:07:41
【问题描述】:
我不能让它工作:
$('#guiacategs').live('pagecreate', function(event, ui) {
$.mobile.loadingMessage = "Carregando Categorias...";
$.mobile.showPageLoadingMsg();
if(CategFornsFetched == 0) {
$.getJSON('http://www.casamentojundiai.com.br/scripts/mobile/getguiacategs.php?callback=?', function(json) {
$.each(json, function(key, val) {
$("#listaCateg").append('<li><a href="guia.html" onclick="genForns(' + val.id + ');">' + val.descricao + '</a></li>');
});
$("#listaCateg").listview('refresh');
});
CategFornsFetched = 1;
}
$.mobile.hidePageLoadingMsg();
});
但这有效,当我之前调用停止加载时:
$('#guiacategs').live('pagecreate', function(event, ui) {
$.mobile.loadingMessage = "Carregando Categorias...";
$.mobile.showPageLoadingMsg();
$.mobile.hidePageLoadingMsg();
if(CategFornsFetched == 0) {
$.getJSON('http://www.casamentojundiai.com.br/scripts/mobile/getguiacategs.php?callback=?', function(json) {
$.each(json, function(key, val) {
$("#listaCateg").append('<li><a href="guia.html" onclick="genForns(' + val.id + ');">' + val.descricao + '</a></li>');
});
$("#listaCateg").listview('refresh');
});
CategFornsFetched = 1;
}
});
谢谢
【问题讨论】:
标签: jquery android html jquery-mobile