jquery ui dialog position 初始化位置

	buildInfoDialog.dialog({
		title:"初始化楼信息",
		autoOpen:false,//默认关闭
		modal: true,//开启遮罩层
		width:390,
		height:330,
		resizable:false,
		position: { using:function(pos){
			console.log(pos)
			var topOffset = $(this).css(pos).offset().top;
			if (topOffset = 0||topOffset>0) {
				$(this).css('top', 20);
			}
		}},
		buttons: {
			"保存": saveBuildInfo,
			"关闭": function() {
				buildInfoDialog.dialog( "close" );
			}
		}
	});

你可能感兴趣的:(jquery,UI)