在对话框上使背景无法点击

时间:2014-07-24 03:27:39

标签: jquery dialog

每当我打开jQuery对话框时,我都希望无法在#view

中选择任何内容
    $("#open-dialog").on("click",function(evt) {
        $("#dia-show").dialog({
            width: 195,
            position: {
            at: 'center',
            of: $('#view')
        },
            draggable: true,
            appendTo: "#view",
            modal:true
        });
            return false;
            parent().draggable({
            containment: '#view'
        });
    });

1 个答案:

答案 0 :(得分:1)

modal设置为true将启用后台无法点击:

 $("#open-dialog").on("click",function(evt) {
        $("#dia-show").dialog({
            width: 195,
            position: {
            at: 'center',
            of: $('#view')
            modal:true
            draggable: true,
            appendTo: "#view",

        });
            return false;
            parent().draggable({
            containment: '#view'
        });
    });
相关问题