marck
marck

Reputation: 143

Div Hover Problem

I've got 2 divs, me and bubble inside another div called holder. I want to fire an action when a user hovers over holder. For some reason when I hover over me the action works correctly, but when I hover over bubble it doesnt register as being over the holder div.

Here is the code.

$("#iholder").hoverIntent(function() {
    $("#me").css({
    "background-image": "url(img/me-hover.gif)",
    timeout: 50        
    });
$(this).css({
    "cursor": "pointer",     
    });
$("#bubble").animate({
    opacity: "show"     
    }, "300");
},
function() {
    $("#me").css({
    "background-image": "url(img/me.gif)",    
    }, "300");
$("#bubble").animate({opacity: "hide"}, "200");  
});
});

Here is the HTML

<div id="holder">
<div id="me"></div>
<div id="bubble"></div>
</div>

Upvotes: 0

Views: 250

Answers (1)

Victor
Victor

Reputation: 4721

well to start, you got a typo here:

$("#holder").hoverIntent(function() {
    $("#me").css({
    "background-image": "url(img/me-hover.gif)",
    timeout: 50        
    });

you had #iholder instead of #holder

Upvotes: 2

Related Questions