I'm trying to delay the animation, for this task i'm adding .startAnimation
class after 500 milliseconds for animation.
HTML
<div class="layout">Hover It</div>
<div class="hoverDiv"></div>
JS
setTimeout(function(){
$(".layout").addClass('startAnimation');
}, 500);
$('.hoverDiv').hide();
$('.startAnimation').hover(function(){
$('.hoverDiv').show();
});
But problem is that hover()
does not working with added class .startAnimation
however its working with .layout
class which is located on the same div
. I checked .startAnimation
class is adding properly after 500 milliseconds. Can any one guide me regarding this issue that i can fix it. I will appreciate.
Here is reference Demo