2012-04-04 3 views
1
で働いていない( "ホバー")

私はIE8で動作しません。このコードを持っている:jQueryの.is場合:IE8

それは、この行に分割し
$("#intro-screenshot").hover(
    function(){ 
     $(".img-action").show(); 
    }, 
    function(){ 
     if(!$(".img-action").is(":hover")) { 
     $(".img-action").hide(); 
     } 
    } 
); 

if(!$(".img-action").is(":hover"))

HTML:

<a href="#"> 
    <img src="#" alt="" id="intro-screenshot" /> 
    <span class="img-action" style="top:90px; left:115px;"> 
    See Features 
    </span> 
</a> 

私は、これは知られているjQueryの問題ではないと思いますが、私は間違っているかもしれない。..

JSFIDDLE

+0

を使用していますか? – Greg

+0

あなたはjsfiddleを作ることができますか? –

+0

Jquery 1.6.2と上記のjsfiddle – greener

答えて

2

あなただけのCSSを使用することができます。あなたが解決しようとしている正確な問題を扱い、よりエレガントに処理します。

#inner { 
    display: none; 
} 

#outer:hover #inner { 
    display: block; 
} 

jsFiddle:http://jsfiddle.net/7xMpr/

EDIT:

そしてjsFiddleは何jQueryのバージョンを使用しているあなたのコードhttp://jsfiddle.net/QeLSJ/1/

1

あなたは、これがしようとした場合:

$("#intro-screenshot").hover(
    function(){ 
     $(".img-action").show(); 
    }, 
    function(){ 
     if($(".img-action:hover").length == 0) { 
     $(".img-action").hide(); 
     } 
    } 
); 
0
try{ 
    jQuery('body').live('click', function(){ 
    var booleans=0; 
    try{ 
     booleans=jQuery("#loginForm:hover").length; 
     //booleans=jQuery('#loginForm').is(':hover'); 
    }catch(e){} 
    if(booleans==0){ 
     document.getElementById("d1").style.display = 'none'; 
    } 
    });  
}catch(e){}