Remove hidden from only hovered element

Joined
Jul 21, 2022
Messages
2
Reaction score
0
I have about 9 blocks all with the hidden class in the span element, using my code below, I hover over 1 span block and it removed hidden from all 9 blocks... I just want it to remove from 1 block that I'm hovering on


JavaScript:
$(document).ready(function($) {

  $('.image-link-hover').hover(function() {
    $('span.hover-img').toggleClass('hidden');
  });

});
 
Joined
Jul 3, 2022
Messages
93
Reaction score
23
JavaScript:
$('.image-link-hover').hover(function() {
      $(this).children('span.hover-img').toggleClass('hidden');
    });
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top