I would like to add a custom class on mouseover. So that when the mouse is hovered over .leftbar
, a class is added and it should be popped up(I set css for his). How do I add slow
or time delay for the popup?
<script>
$(document).ready(function(){
$( ".leftbar" ).mouseenter(function() {
$( "body" ).addClass( "myclass" );
});
});
$(document).ready(function(){
$( ".leftbar" ).mouseleave(function() {
$( "body" ).removeClass( "myclass1" );
});
});
</script>
I tried this- $( "body" ).addClass( "myclass" , '300');
with no luck
Thank you!