1
I am new to sencha touch mobile and my issue is when i am clicking the alert MSG OK button my list view is also getting the click event in the portion of OK button . So i need to put some time delay before hiding the alert and clicking OK, can any one help how to give some time delay in alert OK button event or any other solution for the fix. Please find the below code. Thanks in advance.

Ext.Msg.alert('', '数据保存成功', function(btn, text){

if (btn == 'ok'){

// DO WORK

//Ext.defer(function(){ console.log('ok clicked');},400);

}else{
return false;
}
});
4

1 回答 1

4

如果要添加延迟,可以使用内置的 setTimeout 方法:

setTimeout(function() {
  // do your work here
}, 400);
于 2011-11-09T11:05:47.200 回答