微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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 );

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐