【发布时间】:2013-03-31 05:24:58
【问题描述】:
我正在使用 jQuery Mobile,如果 div 中的文本等于某个值,则无法重新加载页面。 div 的内容是用 AJAX 加载的。 div 的内容正在通过 AJAX 更新就好了,但我不知道为什么当内容等于“您的项目已过期”时页面没有重新加载。
$(document).on('pagebeforeshow', '#listitem', function(event){
$(document).ready(function(){
refreshTable();
});
function refreshTable(){
$('#tableHolder').load('ajax_item_time.php', function(){
if($("#tableHolder").text() == "Your item has expired."){
window.location.assign("mobile_list.php")
}
else {
setTimeout(refreshTable, 5000);
}
});
}
});
有什么想法吗?谢谢!
【问题讨论】:
标签: javascript jquery ajax jquery-mobile