views:

332

answers:

1

I am having problems with the Jquery qtip plugin.

It works fine in Firefox (see here http://movieo.no-ip.org/ hover over the first image).

But doesn't work in IE. This is the code:

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

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

And the 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-->

Why wouldn't that work in IE????? Beats me. Checkout movieo.no-ip.org for the whole source

A: 

Try using the following:

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

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

In IE .info isn't a direct descendant of .moviebox.

Sam
Thank you so much! It works. Can I ask why in IE it isn't a descendant??
At a guess it's something to do with your rounded corners plugin. It looks like it's wrapping your content in extra divs.
Sam