为什么这不起作用?
$("#left").hover(
function () {
$("#left .more").animate({height:"120px"}, 500);
}
);
我不能为我的生活弄明白。
答案 0 :(得分:1)
在黑暗中疯狂拍摄,因为你没有显示任何HTML。
在绑定事件之前等待document.ready
,因为在JS执行时没有加载DOM树:
jQuery(function ($) {
//code goes here
});
或者,您可以使用live
或delegate
绑定事件,以便即使在插入其他DOM元素后它们也能正确执行:
$('#left').live('hover', function...);
答案 1 :(得分:0)
适合我...尝试从this开始。
我认为你选错了(#left .more)