我正在使用 jQuery animate 扩展一个 div。然而,在那个 div 中,我有另一个 div,我想跟随它展开并始终在右下角。
这是jquery代码
$( ".top-button" ).click(function() {
$('.top-menu').animate({ height: 110 }, 800);
});
我猜这与 CSS 相关?
最佳答案
你可以试试这个
$(document).ready(function() {
$( ".top-button" ).click(function() {
$('.top-menu').animate({height:110},800);
$('.top-button').animate({bottom:0},800);
});
});
关于具有以下内容的 jQuery 动画高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19177685/