tags:

views:

77

answers:

1

I'm using the qTip plugin for jQuery. Using the following function it cycles through each of the a tags with a rel attribute and applies the qtip function to each link. Works a treat in Firefox and Safari and is supposed to work in IE.

$('a[rel]').each(function () {
  var $link = $(this);
  $link.qtip({ 
      content: {
 url: '/tooltip.php',
 data: { tipKey: $link.attr('rel') },
 method: 'post'
      },
      style: { 
             border: { width: 9, radius: 9, color: '#C1AD06' },
       tip: { 
        corner: 'topLeft',
        size: {
         x: 55, 
         y : 34 
   }
 },
       width: { min:  393 },
       background: '#CBCB07',


      }
  });
});

Problem is, in IE7 it seems to break my javascript e.g all my other js functions.

I'm not sure how I go about debugging this... if I remove the above from my javascript file everything works fine.

I should mention that only a tags with rel attributes are related to tooltipping and nothing else.

+3  A: 

Get rid of this comma:

background: '#CBCB07',

IE doesn't accept commas after the last item in an object. See Last Comma in Object/Array Issue in IE.

cletus
omg. thanks for this.
wenbert
incredible. thanks cletus.
cosmicbdog
You're welcome.
cletus