2010-03-23 133 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,它会工作。