Pull to refresh

jQuery .is(":hover") не работает в опере 12 и в IE8, чем заменить

Код следующего вида выдаст ошибку в opera 12 и в IE8:
setTimeout(function() {
    if(this.is(":hover")){
        console.info('Все еще наведена мышка');
    }
},500);


Решение №1 (opera 12, IE8)

$("#block").hover(function() {
    $(this).data('hovering', true);
}, function() {
    $(this).data('hovering', false);
});

...

setTimeout(function() {
    if(this.data('hovering')){
        console.info('Все еще наведена мышка');
    }
},500);


Решение №2 (только IE8, в opera 12 будет ошибка)

setTimeout(function() {
    if($("#" + $(this).attr("id") + ":hover").length > 0){
        console.info('Все еще наведена мышка');
    }
},500);
Tags:
Hubs:
You can’t comment this publication because its author is not yet a full member of the community. You will be able to contact the author only after he or she has been invited by someone in the community. Until then, author’s username will be hidden by an alias.