Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery qtip doesn't draw little arrow tip in IE8 (or IE7)

Tags:

jquery

draw

qtip

I'm using jquery's qtip plugin to draw a tooltip, and it works fine on FF but not on my versions of IE. It looks like for IE, the plugin uses vml tags instead of canvas tags. Is there something extra I need to include in my page to get the little arrow tip to show? Here's my simple html page; note that when you mouse over "tooltip target", the gray box shows up, but not the arrow tip:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <script type="text/javascript" src="/jquery-1.4.2.js" />
    <script type="text/javascript" src="/jquery.qtip-1.0.0-rc3.js" />
</head>
<body>
    <a id="my_tooltip">tooltip target</a>

<script type="text/javascript">//<--
    jQuery(document).ready(function() {
        jQuery("#my_tooltip").qtip({
        "content": {
            "text": "this is a test"
        },
       "position": {
       "corner": {
       "target": "bottomMiddle",
       "tooltip": "topMiddle"
       }
       },
       "style": {
       "tip": {
       "corner": "topMiddle",
       "color": "#999999",
       "size": {
       "x": 10,
       "y": 10
       }
   },
   "border": {
   "width": 2,
   "radius": 3,
   "color": "#999999"
   }
}
});

});
// --></script>
</body>
</html>
like image 398
tonyunfang Avatar asked Nov 06 '22 07:11

tonyunfang


1 Answers

It turns out that to get qTip to work with jquery-1.4.2, I had to upgrade to a later version of qTip. I first tried the latest revision (#55), but that gave a recursion error, so I settled on revision #27 which was listed as having 1.4.2 compatibility. That made my arrow tips appear, yay!

like image 107
tonyunfang Avatar answered Nov 12 '22 15:11

tonyunfang