How do I do when hovering over a particular div, another element appears?

0

My goal is to have an invisible div, and when you hover over this invisible div, make another div appear?

example:

<div class="invisivel"></div>
<div class=visivel">
  Olá
</div>
    
asked by anonymous 13.09.2017 / 16:39

1 answer

3

I think the description of your problem is wrong.

Anyway, just use the show() method of jQuery within a mouseOver event.

$('.visivel').on('mouseover', function() {
  $('.invisivel').show();
});

$('.visivel').on('mouseout', function() {
  $('.invisivel').hide();
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><divclass="visivel">
  Olá
</div>

<div class="invisivel" style="display:none">
  Invisivel
</div>
    
13.09.2017 / 16:43