when I hover over my div the pop up fades in like it should but it affects all the other divs with the same class as well. I just want it to effect the div that’s being hovered on. Any help would be appreciated. Thank you!
$(document).ready(function() {
$(".project").hover(function() {
$('.caption').fadeToggle(1000);
});
});
Simply provide a context:
With this approach, jQuery will look at the current
.projectelement and look within that element for descendant elements with the class ofcaption; rather than looking at the whole document.