jquery-ui – 设置jquery ui的对话框模态宽度?

您好

我正在使用this demo显示模态对话框

如果我将其用于google街景视图,我如何设置对话框的宽度:

var point = new GLatLng(svlat,svlon);
var panoClient = new GStreetviewClient(); 
panoClient.getNearestPanoramaLatLng(point,function (newPoint) {
  if (newPoint == null) {
      alert("no panorama found for this position!!");
      return;
  }
  panoramaOptions = { latlng: newPoint };
  myPano = new GStreetviewPanorama(document.getElementById("pano"),panoramaOptions);
  $('#dialogStreetView').dialog("option","maxWidth",600);
  $('#dialogStreetView').dialog('open');
  GEvent.addListener(myPano,"error",handleNoFlash);
});

HTML:

<div id="dialogStreetView" title="Street View Provided by Google... "     style="width:300px;height:300px">
    <a id="closestreet-view" name="closestreet-view" style="cursor:pointer; text-   decoration:underline" >Close</a>
    <div name="pano" id="pano" style="width: 300px; height: 300px"></div>
</div>

解决方法

从文档:

> http://docs.jquery.com/UI/Dialog

这应该工作:

$("#dialogStreetView").dialog( "option","width",460 );

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: &lt;span id=&quot...
jQuery 添加水印 &lt;script src=&quot;../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...