这里是我的旧代码的工作原理:为什么这个悬停事件触发页面加载?
$('.logo').hover(function(){
$(this).addClass('animated swing')},
function(){$(this).removeClass('animated swing')
});
这里是我的,即时通讯试图重构新的代码。问题是当页面加载时(无需我在标志上盘旋)添加类“动画摇摆”。
$('.logo').on('hover').toggle(function() { $(this).toggleClass('animated swing') });
它也不会发挥超越了第一次
其2班我想补充:)谢谢你的回答! – Tallboy
没问题。是的,2类听起来很合理:) – Alp