开发者

how to call jquery modal

I have an issue with how to call/display my modal when a link is click. Any idea on how to make this work?

$(document).ready(function(){ 
   $('#dialog').hide();
        $('a.Temp').click(function(){
           $('#dialog').dialog({ 
                        modal: true,
                        //autoOpen: false,
                     开发者_如何学C   bgiframe: false,
                        closeOnEscape: false,
                        title: "Test",
                        width: 520,
                        height: 360,
                        open: function(event, ui) { 
                                jQuery('.ui-dialog-titlebar-close').hide();
                                $('#dialog').dialog('option', 'position', 'center'); },
                        buttons: [
                            {
                                text: "Cancel",
                                click: function() { $(this).dialog("close"); }
                            },
                            {
                                text: "Save"
                            }],
                        draggable: false });
        return false;

        });
     });


$('a.Temp').click(function(){


        $('#dialog').dialog({ 
                        modal: true,
                        autoOpen: false,
                        bgiframe: false,
                        closeOnEscape: false,
                        title: "Test",
                        width: 520,
                        height: 360,
                        open: function(event, ui) { 
                                jQuery('.ui-dialog-titlebar-close').hide();
                                $('#dialog').dialog('option', 'position', 'center'); },
                        buttons: [
                            {
                                text: "Cancel",
                                click: function() { $(this).dialog("close"); }
                            },
                            {
                                text: "Save"
                            }],
                        draggable: false });
        return false;

});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜