【发布时间】:2013-04-08 17:18:56
【问题描述】:
我有一个 只有填充的 div,我还有另一个没有任何 css 属性的 div。
我想使用 outerHeight 为两个 div 赋予相同的高度。
这是我的测试,它有效但并不完美: http://jsfiddle.net/A2bNm/6/
$("#container").mouseenter(function () {
$("#top").animate({ 'padding' : 70 }, "slow");
$("#bottom").animate({'height':($("#top").outerHeight())}, "slow");
}).mouseleave(function () {
$("#top").animate({ 'padding' : 20}, "slow");
$("#bottom").animate({'height':($("#top").outerHeight())}, "slow");
});
可以帮忙吗?谢谢你,对不起我的英语不好! :)
【问题讨论】:
标签: jquery jquery-animate outerheight