2012-11-03 3 views
1

jQuery 모바일을 사용하여 Facebook 앱을 개발하고 있습니다. 여기서 두 번째 대화 상자 (연결)를 만드는 대화 상자를 만듭니다.jQuery 모바일에서 연결 대화 상자 : Android에서 두 번째 대화 상자가 사라짐

Android 및 Opera에서 두 번째 대화가 잠시 표시되고 사라지는 문제가 있습니다.

이 동작을 피하는 방법이 있습니까? 그렇지 않으면 두 번째 파일을 손상시키지 않고 첫 번째 대화 상자를 어떻게 파기 할 수 있습니까?

CODE :

function function1(item) {   
     showDialog(..., function(){ 
       ... 
       if (appInstalled == true) {       
         if(function2(item) == true) { 
           //call to alert dialog function2 
         } 
       } 
     }); 
} 

function function2(item) { 
     if (...) { 
       showAlertDialog(item.name, messages.MATCH_CONFIRMATION_MSG, item.picture.data.url, '#friendsPage'); 
       $('#dialog').dialog('close'); 
       $('#alertDialogTrickLink').click();//this is event for going to dialog 
     } 

} 

function showDialog(title, content, img, hrefURL, hrefURLcancel, callbackFunction) { 
     $('#dialog-content').html(content); 
     $('#dialogHeader').text(title); 
     if (img != null) { 
       $('#dialog-img').html('<img src="' + img +'" alt="" class="bigImg" />'); 
     } else { 
       $('#dialog-img').html(''); 
     } 
     var a = messages.ACCEPT_BUTTON_TEXT; 
     var c = messages.CANCEL_BUTTON_TEXT; 
     $('#dialogActions').html(
       '<a href="' + hrefURL + '" data-role="button" data-theme="c" id="confirmDialogAction" data-icon="check" data-iconpos="left">' + a + '</a>' +  
       '<a href="' + hrefURLcancel + '" data-role="button" id="skipDialogAction" data-icon="delete" data-iconpos="left">' + c + '</a>' 
     ); 
     $('#confirmDialogAction').click(function(e) { 
       e.preventDefault(); 
       callbackFunction(); 
     }); 
     $('#dialog').trigger('create'); 
} 

감사

+1

당신이 작은 예제를 제공 할 수 여기에 설명 된 setTimeout 접근 방법을 시도 해 봤나 밀? – Taifun

+0

안녕 Taifun. 작동하지 않는 코드로 편집하면됩니다. 감사! – Arturo

답변

관련 문제