let imgSrc = 'animation.gif'
$('.gif').hover(function() {
$(this).hasClass('hovered')?console.log('already hovered'):$(this).addClass('hovered');
$(this).find('img').attr('src',imgSrc);
});
.gif {
display: block;
background: url('stat.gif') no-repeat;
}
.gif img {
visibility: hidden;
}
.gif .hovered {
background: none;
}
.gif .hovered img {
visibility: visible;
border:0;
}
$("#sh-close").click(function () {
$('.search-box').toggleClass('active');
$('.search-bar').toggleClass('active');
});
$('.ul-w-button1').eq(0).attr('id','my_id')