【发布时间】:2015-08-17 11:03:55
【问题描述】:
我有一个幻灯片,它提供了 2 个显示为 [aria-hidden=true] 的元素。我需要容器使用具有 [aria-hidden=true] 的 2 个元素进行缩放。
有人知道如何在 Jquery 中编写脚本吗?
提前致谢
【问题讨论】:
我有一个幻灯片,它提供了 2 个显示为 [aria-hidden=true] 的元素。我需要容器使用具有 [aria-hidden=true] 的 2 个元素进行缩放。
有人知道如何在 Jquery 中编写脚本吗?
提前致谢
【问题讨论】:
我不是 100% 确定你在这里问什么。如果可能,请提供一些示例代码。
但是,也许这样的事情会起作用:
$('[aria-hidden="true"]')
.parent()
.css({
height: '100%'
});
否则,这里有一些 stackoverflow 文章可能会为您指明正确的方向:
jQuery: Get height of hidden element in jQuery
Using jQuery to adjust a parent element's height to match it's visible child's height
希望这会有所帮助。
【讨论】: