-1
我有这个在cordova中的函数中创建的弹出窗口。jquery popup在cordova中打开后立即关闭iOS 9
var problem_list2 = new Array();
function addSymptom(symptom){
$.ajaxSetup({ async: false});
//$.mobile.loading('show');
if($.inArray(symptom, problem_list2)===-1){
problem_list2.push(symptom);
//var lis = problem_list2;
var $popUp = $("<div/>").popup({
dismissible : true,
theme : "a",
overlayTheme : "a",
transition : "slide"
}).bind("popupafterclose", function() {
$(this).remove();
});
$("<h2/>", {
text : "Problem List"
}).appendTo($popUp);
for(var i=0;i<problem_list2.length;i++){
$("<h4/>", {
text : problem_list2[i]
}).appendTo($popUp);
}
$('<input type="button" data-iconpos="right" data-icon="plus" value="Add More Symptoms" onclick="closer()">').appendTo($popUp);
$('<input type="button" data-iconpos="right" data-icon="check" value="Diagnose" onclick="diagnose()">').appendTo($popUp);
$popUp.popup("open").trigger("create");
}
}
当按下关闭按钮,此功能关闭弹出:
function closer(){
$('.ui-popup').popup('close');
}
它可以在任何网络浏览器和科尔多瓦Android精品。但在cordova iOS 9中,弹出窗口在第一次打开时立即关闭。第一次保持打开状态后,只有在首次打开时才会出现此行为。我尝试添加数据的历史=“假”是这样的:
var problem_list2 = new Array();
function addSymptom(symptom){
$.ajaxSetup({ async: false});
//$.mobile.loading('show');
if($.inArray(symptom, problem_list2)===-1){
problem_list2.push(symptom);
//var lis = problem_list2;
var $popUp = $("<div data-history='false' />").popup({
dismissible : true,
theme : "a",
overlayTheme : "a",
transition : "slide"
}).bind("popupafterclose", function() {
$(this).remove();
});
$("<h2/>", {
text : "Problem List"
}).appendTo($popUp);
for(var i=0;i<problem_list2.length;i++){
$("<h4/>", {
text : problem_list2[i]
}).appendTo($popUp);
}
$('<input type="button" data-iconpos="right" data-icon="plus" value="Add More Symptoms" onclick="closer()">').appendTo($popUp);
$('<input type="button" data-iconpos="right" data-icon="check" value="Diagnose" onclick="diagnose()">').appendTo($popUp);
$popUp.popup("open").trigger("create");
}
}
和这样:
var problem_list2 = new Array();
function addSymptom(symptom){
$.ajaxSetup({ async: false});
//$.mobile.loading('show');
if($.inArray(symptom, problem_list2)===-1){
problem_list2.push(symptom);
//var lis = problem_list2;
var $popUp = $("<div/>").popup({
dismissible : true,
datahistory : 'false',
theme : "a",
overlayTheme : "a",
transition : "slide"
}).bind("popupafterclose", function() {
$(this).remove();
});
$("<h2/>", {
text : "Problem List"
}).appendTo($popUp);
for(var i=0;i<problem_list2.length;i++){
$("<h4/>", {
text : problem_list2[i]
}).appendTo($popUp);
}
$('<input type="button" data-iconpos="right" data-icon="plus" value="Add More Symptoms" onclick="closer()">').appendTo($popUp);
$('<input type="button" data-iconpos="right" data-icon="check" value="Diagnose" onclick="diagnose()">').appendTo($popUp);
$popUp.popup("open").trigger("create");
}
}
我想,在=“假”上面的编辑。没有工作。 – user1518003