开发者

Is there anything wrong with this jquery function? Works in FF, Safari, but IE Dies

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 debuggin开发者_StackOverflow社区g 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜