bla bla ...">

Jquery: hide / show div2 inside another div1 on mouseover

I have something like this:

<div id="wrap1">
<div id="util1">
</div>
bla bla
</div>

<div id="wrap2">
<div id="util2">
</div>
bla bla
</div>

<div id="wrap3">
<div id="util4">
</div>
bla bla
</div>

...

      

I need to show the "util" div when the cursor is over the "wrap" div and hide it when the cursor leaves the "wrap" / strong> div

+2


a source to share


1 answer


$("div[id^=wrap]").hover(function() {
    $(this).find("div[id^=util]").show();
}, function() {
    $(this).find("div[id^=util]").hide();
});

      

Cm:



+3


a source







All Articles