2010-03-23 134 views
1

我有問題的JQuery的qtip插件。問題與IE和JQuery的qTip插件

它在Firefox中正常工作(請參閱http://movieo.no-ip.org/將鼠標懸停在第一張圖片上)。

但在IE中不起作用。這是代碼:

$('.moviebox').each(function() { 
    $(this).qtip({ 
     content: $(this).children('.info'), 
     show: 'mouseover', 
     hide: 'mouseout', 

     style: { name: 'light' }, 
     position: { 
     corner: { 
      target: 'rightbottom', 
      tooltip: 'bottomleft' 
     } 
     } 
    }); 
}); 

和HTML

<!--start moviebox--> 
    <div class="moviebox"> 
    <a href="#"> 
    <img src="http://1.bp.blogspot.com/_mySxtRcQIag/S6deHcoChaI/AAAAAAAAObc/Z1Xg3aB_wkU/s200/rising_sun.jpg" /> 
    </a> 
    <!--start infobox--> 
    <div class="info"> 
    <span>Rising Sun (2006)</span> 
    <div class="description"><strong>Description:</strong><br /> test test test test test test test test test test test test test test test test</div> 
    <img src="http://1.bp.blogspot.com/_mySxtRcQIag/S6deHcoChaI/AAAAAAAAObc/Z1Xg3aB_wkU/s200/rising_sun.jpg" /> 
<div class="cast"><strong>Cast:</strong><br /> Sean connery</div> 
    <div class="rating"><strong>Rating:</strong><br />5stars</div> 
    </div> 
    <!--end infobox--> 
    </div> 
    <!--end moviebox--> 

爲什麼不會在IE瀏覽器的工作?????打敗我。結帳movieo.no-ip.org整個源

回答

3

嘗試使用以下:

$('.moviebox').each(function() { 
    $(this).qtip({ 
     content: $(this).find('.info'), 
     show: 'mouseover', 
     hide: 'mouseout', 

     style: { name: 'light' }, 
     position: { 
     corner: { 
      target: 'rightbottom', 
      tooltip: 'bottomleft' 
     } 
     } 
    }); 
}); 

在IE .INFO不是.movi​​ebox的直系後裔。

+1

非常感謝!有用。我可以問爲什麼在IE中它不是後代? – user272899 2010-03-23 15:46:25

+1

在猜測這是你的圓角插件。它看起來像是將你的內容封裝在額外的div中。 – Sam 2010-03-23 15:52:05

0

您可以添加

<meta http-equiv="X-UA-Compatible" content="IE=Edge"> 

的IE,它會工作。