So I have several DIVs called achievement, and each one contains a span called recent-share. WHat I would like to do is have each recent-share hidden at first, and the have it appear when the parent ‘acheivement’ class is hovered. I’m trying to use $(this) to get it, but it won’t work. I’m assuming this is a syntax error or something, and any help would be appreciated!
<script>
$(".recent-share").hide();
$('.achievement').hover(
function ()) {
$(this).next(".recent-share").show();
});
</script>
Try:
Also you had a syntax error – it should be
function () {, notfunction()) {.