内容高度/宽度更改后如何调整 nyroModal 的大小

发布于 2024-10-02 03:17:31 字数 115 浏览 1 评论 0原文

我正在使用 nyroModal 显示模式窗口。当显示初始内容时它工作正常。但在内容中我有一个 jQuery 切换方法,可以使其他部分可见。

我希望模式自动调整大小以适应新的内容区域。我怎样才能实现它。

I am using nyroModal to show a modal window. It works fine when the initial content is showed. But in the content I have a jQuery toggle method, that makes visible other sections.

I want the modal to auto resize to the new content area. How can I implement that.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

春风十里 2024-10-09 03:17:31

我还没有尝试过这个,但是 nyroModal 会监听窗口调整大小事件来调整模式的大小,所以也许自己触发一个可以在这里有所帮助。例如

$(window).resize();

,但是如果“模态窗口”是 iframe,则 nyroModal 将不知道将模态大小调整为什么大小。

I haven't tried this, but nyroModal listens for window resize events to resize the modal, so maybe triggering one yourself could help here. E.g.

$(window).resize();

However if the "modal window" is an iframe, then nyroModal won't know what size to resize the modal to.

阳光的暖冬 2024-10-09 03:17:31

运行此 javascript:

$.nyroModalSettings({
  width: 645,
  height: 410,
  windowResizing: true
});

您的 nyroModal 将调整大小(动画)

Run this javascript:

$.nyroModalSettings({
  width: 645,
  height: 410,
  windowResizing: true
});

And your nyroModal will be resized (animated)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文