我有一个列表,我在其中添加了三个功能(“附加”,“审查”)。按钮在行上,在行上单击?实际上我在第二页,但我在所有情况下都调用第三页,但做一些不同的事情。但是问题是它进入第三页然后返回第一页..这是我的代码..?
$(document).on('click', '.review_h', function(event) {
event.stopPropagation();
ROW_ID = $(this).closest(".documentRowID").attr("id");
var ipAd= window.localStorage.getItem("IP_ADDRESS");
if(ipAd==''||ipAd==null){
navigator.notification.alert("Please configure IP Address.");
return;
}
getDocumentValue();
alert("review click");
setTimeout(function(){
readRtfFile();
},100);
$.mobile.changePage($("#realTimeScreen"));
});
$(document).on('click', '.append_h', function(event) {
event.stopPropagation();
alert("append click");
ROW_ID = $(this).closest(".documentRowID").attr("id");
var ipAd= window.localStorage.getItem("IP_ADDRESS");
if(ipAd==''||ipAd==null){
navigator.notification.alert("Please configure IP Address.");
return;
}
getDocumentValue();
$.mobile.changePage($("#realTimeScreen"));
});
$(document).on('click', '.documentRowID', function(event) {
event.stopPropagation();
/* $.mobile.changePage($("#realTimeScreen"), {
transition: "slide",
reverse: false,
changeHash: false
});*/
alert("row click")
var ipAd= window.localStorage.getItem("IP_ADDRESS");
if(ipAd==''||ipAd==null){
navigator.notification.alert("Please configure IP Address.");
return;
}
ROW_ID=this.id;
getDocumentValue();
$.mobile.changePage($("#realTimeScreen"));
console.log(this.id)
});
function queryDocumentSuccess(tx, result) {
var len = result.rows.length;
$('#folderInside_Data').empty();
for (var i = 0; i < len; i++) {
$('#folderInside_Data').append(
'<li class="documentRowID" id="' + result.rows.item(i).id+ '" data-rel="popup" data-position-to="window">' + '<a href="#">' + '<img src="img/Documents.png">' + '<h2>' + result.rows.item(i).DocumentName + '</h2>' + '<p>' + result.rows.item(i).DocumentNotes + '</p>' + '<p>' + result.rows.item(i).DocumentDate + '</p>' +
'<span class="ctrl "><fieldset data-role="controlgroup" data-type="horizontal" data-mini="true" ><button class="button_design append_h">Append</button><button class="button_design connect_h">Review</button></fieldset><span>'+'</li>'
);
}
$('#folderInside_Data').listview('refresh');
}
但它进入主页..?