Jquery UIを使用してクリックするとポップアップを開きますが、このポップアップはすぐに閉じます。理由がわかりません。これが私のコードです:
function openPopUp() {
// alert("Handler for .click() called.");
$("#dialog:ui-dialog").dialog("destroy");
$("#select-method").dialog({
modal : true,
height: 573,
width: 766 ,
buttons : {
Exporter : function() {
//$(this).dialog("close");
alert("Exporter");
// close the dialog
},
'Etat de surveillance' : function() {
//$(this).dialog("close");
alert("Etat de surveillance");
// close the dialog
},
Annuler : function() {
//$(this).dialog("close");
alert("Annuler");
// close the dialog
}
}
});
};
コードhtmlは次のとおりです。
<div id="other" class="popLink">This is text
<a href="" class="popLink" onClick="openPopUp();">
Click to open pop up
</a>
</div>
<div class="noDisplay">
<div id="select-method" title="selection des méthodes et calcul des provisions">My pop upis opened
</div>
</div>