在 Eric Martin 的 Simplemodal jQuery 插件中,可以动态调整 CSS 吗?

发布于 2024-08-26 09:37:43 字数 161 浏览 1 评论 0原文

我想调整简单容器的高度,以匹配使用 $.ajax 从服务器返回的数据传递的不断变化的深度要求。

似乎一旦模式被触发,所有 CSS 都会即时更改,例如 $('#someid').css('height','500px')

无论如何要覆盖设置的 CSS 吗?

谢谢

I would like to adjust the height of the simple-container to match changing depth requirements passed on data returned from the server using $.ajax.

It seems that once the modal is fired, all CSS changes on the fly, e.g. $('#someid').css('height','500px')

Anyway to override the set CSS?

Thanks

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

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

发布评论

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

评论(1

并安 2024-09-02 09:37:43

抱歉,这个问题已经以不同的形式提出和回答了。这是我的代码,现在我有一个动态调整大小的模式。

添加:

$('#simplemodal-container').css('height', 'auto');

如:

$('#mycontainer').modal({onShow: function (dialog) {
             $('#simplemodal-container').css('height', 'auto');
        }});

Sorry, this had been asked and answered in a different form. Here my code and now I have a dynamically resizing modal.

Added:

$('#simplemodal-container').css('height', 'auto');

as in:

$('#mycontainer').modal({onShow: function (dialog) {
             $('#simplemodal-container').css('height', 'auto');
        }});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文