jQuery UI dialog positioning : adjust position top by 20px -

独自空忆成欢 提交于 2019-12-03 04:24:08
chris loughnane

Changing the last value solved the problem:

position: ['center',20] 

http://jsfiddle.net/chrisloughnane/wApSQ/3

Yogesh Avhad

The easiest way is:

$("#dialog").dialog({ position: { my: "center", at: "top" } });

using Jquery UI 1.11.4

        var Y = window.pageYOffset;

        $( "#dialogJQ" ).dialog({
            modal: true,
            closeOnEscape: false,                
            width:'auto',
            dialogClass: 'surveyDialog',
            open: function(event, ui) {
                $(this).parent().css({'top': Y+20});
            },
        });
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!