今天,我尝试在自己的网站中实施animate.css
但我想确保在以下位置激活了“效果”:悬停因此我为此使用了jquery
代码是:
$(".questo").hover( function (e) {
$(this).toggleClass('animated shake', e.type === 'mouseenter');
});
问题在于,一旦移开鼠标,效果就会中断。它一旦开始就可以在没有悬停效果的情况下获得“效果”?
谢谢大家
查看此变体(更具交互性):
$(".myDiv").hover(function(){
$(this).addClass('animated ' + $(this).data('action'));
});
$(".myDiv").bind("animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd",function(){
$(this).removeClass('animated ' + $(this).data('action'));
});
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句