Ron
Ron

Reputation: 4095

CSS ie6 hover issue

I am pretty sure everyone knows the hover issue in IE6. I tried to fix the problem by using "csshoverfix.htc" or "whatever:hover". I downloaded it from the writer's page, and ofcourse I added

body { behavior:url("csshover.htc"); }

to my css file, But it didnt help. I also tried to use jquery hover function:

$(document).ready(function(){
    $('#autoSuggestionsList li').hover(
    function(){
        alert("test");
    },
    function(){
        alert("test");
    })
});

But also it didnt work. I dont know if it can be the reason why it doesnt work, but the <li> with the hover, are made in real time (ajax).

anyway, how can I fix the hover issue?

Thank you.

Upvotes: 0

Views: 370

Answers (1)

BoltClock
BoltClock

Reputation: 723628

I dont know if it can be the reason why it doesnt work, but the <li> with the hover, are made in real time (ajax).

Possibly. Try using .live() instead so that it works with elements that come from Ajax responses:

$(document).ready(function() {
    $('#autoSuggestionsList li').live(
    {
        mouseover: function() {
            alert("test");
        },
        mouseout: function() {
            alert("test");
        }
    });
});

Upvotes: 2

Related Questions