我试图在悬停时设置高度属性的动画,但我无法让它工作。 悬停时,我正在进入悬停功能,但它只是没有动画的高度。jquery动画,无法启动它
if (!Modernizr.csstransitions) { // Test if CSS transitions are supported
if ($('#belt figure').length) {
$('#belt figure figcaption').hover(function() {
$(this).animate({ height: '7em;' }, { queue: false, duration: 500 });
}, function() {
$(this).animate({ height: '3.8em;' }, { queue: false, duration: 500 });
});
}
}
也许它的','在你的价值符号? – DoubleYo 2012-03-21 09:18:12