jQuery mobile - problem with call popup

jQuery mobile - problem with call popup

Hi,

How call popup with jQuery code ? ...

This code doesn't work :

$("#editDialog").popup(); 
$("#editDialog").popup('open');
runConfirmDialog();

function runConfirmDialog() {
$.mobile.changePage( "#editDialog",
{role: "popup"}
);
});







My popup is: 

<div data-role="popup" id="editDialog" data-overlay-theme="a" data-theme="c" style="max-width:400px;" class="ui-corner-all">
<div data-role="header" data-theme="a" class="ui-corner-top">
<h1></h1>
</div>
<div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
<h3 class="ui-title">You have ...</h3>
<a href="#" data-role="button" data-inline="true" data-rel="back" data-theme="c">OK</a>
</div>
</div>