0

我有一个视图,我正在使用该站点提供的工具提示: http ://www.lullabot.com/files/bt/bt-latest/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>

谢谢!

4

3 回答 3

0

在您的 HTML 页面的第一个添加此内容:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
于 2012-02-14T10:27:24.233 回答
0

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 ?

于 2012-02-14T12:37:20.360 回答
0

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

于 2012-02-16T07:55:36.520 回答