开发者

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

开发者 https://www.devze.com 2023-01-22 12:22 出处:网络
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'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": "topM开发者_高级运维iddle",
       "color": "#999999",
       "size": {
       "x": 10,
       "y": 10
       }
   },
   "border": {
   "width": 2,
   "radius": 3,
   "color": "#999999"
   }
}
});

});
// --></script>
</body>
</html>


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!


In order to get qTip to work with jQuery 1.4.2 you need to use a newer version of the qTip library

http://bazaar.launchpad.net/~craig.craigsworks/qtip/1.0/files/25

should work just fine


just remove the position prop and see if that helps.

my solution to similar problem(Could not get the position property in IE8 )

Jquery problems in IE8

0

精彩评论

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