Jquery 工具提示在 IE6 和 IE7 中不起作用?

发布于 2025-01-06 03:15:46 字数 2244 浏览 1 评论 0原文

我有一个视图,在其中使用此网站提供的工具提示: http://www.lullabot.com/files/bt/bt -最新/DEMO/index.html 这在 Google Chrome 和 Firefox 中工作正常,但在 IE6 或 IE7 中不起作用。 1. 如何使其在 IE-6/7 下工作? 2. 另外,我想在工具提示内有一个链接。当我尝试单击工具提示内部时,它消失了。我不希望发生这种情况。作为解决方法,我为工具提示保留了超时。除此之外,还有其他方法可以实现此目的吗?

这是代码:

<link href="../../Content/demo.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/json2.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-1.4.4.js" type="text/javascript"></script>
<script src="../../Scripts/ajax/demo.js" type="text/javascript"></script>
<script src="../../Scripts/ajax/jquery.bgiframe.min.js" type="text/javascript"></script>
<script src="../../Scripts/ajax/jquery.bt.min.js" type="text/javascript"></script>
<script src="../../Scripts/ajax/jquery.hoverIntent.minified.js" type="text/javascript"></script>
<script src="../../Scripts/ajax/jqurey.easing.1.3.js" type="text/javascript"></script>
@*<script src="../../Scripts/ajax/jquery-1.3.2.min.js" type="text/javascript"></script>*@
<script type="text/javascript">
    $(document).ready(function () {
        $(".row").mouseover(function () {
            var d = $(this).attr("id");
            var obj = { x: d };
            $.ajax({
                url: '/Home/Change',
                type: "POST",
                data: JSON.stringify(obj),
                datatype: "json",
                contentType: "application/json; charset=utf-8",
                success: function display(response, status, data) {
                    //alert(response.id);
                    $(".row").bt("<a href='#'>Click here</a> " + response.id, { closeWhenOthersOpen:true,positions: 'bottom', hoverIntentOpts: { timeout: 1500} });
                }
            });

        });
    });
</script>

这是表格代码:

<table>
@for (int i = 0; i < 5; i++)
{
    <tr id="@i" class="row">
    <td>abcd</td>
    <td>this is row number @i</td>
    </tr>
}
</table>

谢谢!

I have a View in which I'm using a tooltip provided by this site:
http://www.lullabot.com/files/bt/bt-latest/DEMO/index.html
This works fine with Google Chrome and Firefox,but this doesn't work in IE6 or IE7.
1. How do I make it work in IE-6/7?
2. Also, I want to have a link inside the tooltip. When I try to click inside the tooltip, it disappears.I don't want this to happen. As a workaround, I have kept a Timeout for the tooltip .Besides that, is there any other way I can achieve this?

Here is the code:

<link href="../../Content/demo.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/json2.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-1.4.4.js" type="text/javascript"></script>
<script src="../../Scripts/ajax/demo.js" type="text/javascript"></script>
<script src="../../Scripts/ajax/jquery.bgiframe.min.js" type="text/javascript"></script>
<script src="../../Scripts/ajax/jquery.bt.min.js" type="text/javascript"></script>
<script src="../../Scripts/ajax/jquery.hoverIntent.minified.js" type="text/javascript"></script>
<script src="../../Scripts/ajax/jqurey.easing.1.3.js" type="text/javascript"></script>
@*<script src="../../Scripts/ajax/jquery-1.3.2.min.js" type="text/javascript"></script>*@
<script type="text/javascript">
    $(document).ready(function () {
        $(".row").mouseover(function () {
            var d = $(this).attr("id");
            var obj = { x: d };
            $.ajax({
                url: '/Home/Change',
                type: "POST",
                data: JSON.stringify(obj),
                datatype: "json",
                contentType: "application/json; charset=utf-8",
                success: function display(response, status, data) {
                    //alert(response.id);
                    $(".row").bt("<a href='#'>Click here</a> " + response.id, { closeWhenOthersOpen:true,positions: 'bottom', hoverIntentOpts: { timeout: 1500} });
                }
            });

        });
    });
</script>

Here is the table code:

<table>
@for (int i = 0; i < 5; i++)
{
    <tr id="@i" class="row">
    <td>abcd</td>
    <td>this is row number @i</td>
    </tr>
}
</table>

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

倾听心声的旋律 2025-01-13 03:15:46

将其添加到 HTML 页面的第一个:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

add this in the first of your HTML page :

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
街角卖回忆 2025-01-13 03:15:46

如果作者为您提供示例工作(在 IE9 上不适合我),那么我将从注释掉除 jQuery 和您的提示插件之外的所有 css 和 js 开始。到时候看看能不能行得通。如果没有,可能是你没有正确安装。如果它能起作用的话。开始取消注释其他库和 css,看看它何时停止工作。你们一定有某种冲突。
您在 Firebug 或 Chrome 开发者工具中看到任何错误或警告吗?

If the authors sample work for you (It doesn't for me on IE9) then I would start from commenting out all css and js except for jQuery and your tip plugin. See if it will work then. If not, maybe you didn't install it correctly. If it will work. start uncommenting other libraries and css to see when it stops working. You must have some kind of conflict.
Do you see any errors or warnings in Firebug or Chrome Developer Tools ?

夏夜暖风 2025-01-13 03:15:46

我得到了第一个问题的答案。为了使其在 IE6 及更高版本中工作,我必须包含 Google 的 Explorer Canvas:excanvas.sourceforge.net

I got the answer to my 1st question. To make it work in IE6 and onward, I have to include the Google’s Explorer Canvas: excanvas.sourceforge.net

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文