开发者

Cannot open JQuery UI dialog more than once on Drupal

开发者 https://www.devze.com 2023-03-19 11:19 出处:网络
I\'ve checked my code and it works fine but for some reason I cannot open Dialog once it was closed. Any advice on why is that?

I've checked my code and it works fine but for some reason I cannot open Dialog once it was closed. Any advice on why is that?

The code i开发者_如何学JAVAs here - http://jsfiddle.net/EA2Dg/1/


Why don't you use "click function to open the dialog, it should work

HTML

<div id="dialog" title="Basic dialog">
    <p>This is an animated dialog which is useful for displaying information. The     dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>

<button id="opener">Open Dialog</button>

JQuery:

<script>
$(function(){
    $("#opener").click(function(){
        $("#dialog").dialog();
    });
});
</script>
0

精彩评论

暂无评论...
验证码 换一张
取 消