tags:

views:

36

answers:

1

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" divs when cursor is over the "wrap" div and hide it back when cursor leaves the "wrap" div

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

See:

karim79