I have a set of divs with a hover effect, but if you hover over them quickly with animation, it will become messy. This is HTML:
<a>
<div class="project">
<img src="img/projects/TrendyPhones.png" alt="project screenshot">
<h3>Trendy Phones</h3>
</div>
</a>
<a href="">
<div class="project">
<img src="img/projects/TrendyPhones.png" alt="project screenshot">
<h3>Trendy Phones</h3>
</div>
</a>
<a href="">
<div class="project">
<img src="img/projects/TrendyPhones.png" alt="project screenshot">
<h3>Trendy Phones</h3>
</div>
$(document).ready(function(){
$('.project').hover(function(){
$(this).find('h3').fadeIn(500);
}, function(){
$(this).find('h3').fadeOut(500);
});
});
source
share