Skip to content

Instantly share code, notes, and snippets.

@amineeg
Last active August 29, 2015 14:01
Show Gist options
  • Save amineeg/7c3d60662e1e41016a62 to your computer and use it in GitHub Desktop.
Save amineeg/7c3d60662e1e41016a62 to your computer and use it in GitHub Desktop.
.animated{
visibility: hidden;
}
.visible{
visibility: visible;
}
jQuery().ready(function(){
$('.blocrst').bind('mouseenter mouseleave',function(e){
if(e.type=='mouseenter') $(this).addClass('animated rubberBand');
else $(this).removeClass('animated rubberBand');
});
$('.animated').appear(function(){
var element=$(this);
var animation=element.data('animation');
if(!element.hasClass('visible'))
{
var animationDelay=element.data('animation-delay');
setTimeout(function(){
element.addClass(animation+' visible');
},animationDelay
);
}
});
});
<div id="wcontent-detail-left">
<img src="images/img_test_detail.jpg" al="" class="animated" data-animation="pulse" data-animation-delay="800" />
<img src="images/img_test_detail.jpg" al="" class="animated" data-animation="pulse" data-animation-delay="800" />
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment