开发者

Function doesn't work at second call

i have this function

function notify()
    {
    alert('oo');
        $("#SuccessNotification").dialog({
    开发者_JS百科    bgiframe: true,
        modal: true,
        title: 'success',
        buttons: {
            Ok: function() {
                $(this).dialog('close');                

            } 
        }
            });
    }

the alert works each time this function is called but the dialog is getting poped out only first time


You have to call the dialog with the open argument like this:

function notify()
{
    alert('oo');
    var elem = $("#SuccessNotification")
    elem.dialog({
    bgiframe: true,
    modal: true,
    title: 'success',
    buttons: {
        Ok: function() {
            $(this).dialog('close');                

        } 
    }
        });
    elem.dialog('open');
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜