1

我在使用 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 以获取整个源代码

4

2 回答 2

4

尝试使用以下内容:

$('.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 的直系后代。

于 2010-03-23T15:33:15.287 回答
0

你可以加

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

对于 IE,它会工作。

于 2013-09-25T04:38:52.837 回答