Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

select div with specific class not all divs jquery

Use this to target the "selected" element, then select the child with find() or children():
$(document).ready(function() {
  $('.box').mouseover(function() {
    $(this).children('.hide').show();
    $(this).children('.show').hide();
  });
  $('.box').mouseleave(function() {
    $(this).children('.hide').hide();
    $(this).children('.show').show();
  });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select #div #specific #class #divs #jquery
ADD COMMENT
Topic
Name
2+2 =