我有以下代码在除 IE 10 之外的所有浏览器上运行良好。
我在 Visual Studio、.NET 框架 4.0 中运行我的代码。我最近刚刚更新到 IE 10。
Java 脚本代码
$(function () {
var du = 1000;
var tooltip;
$(document).tooltip({
show:{effect:'slideDown'},
hide:{effect:'explode',pieces:20,duration:du,delay:du/100},
track: true,
items: "h5",
content: function () {
tooltip = $(this).siblings('.tooltip');
return tooltip.html();
}
});
});
aspx 代码:
<asp:Repeater ID="rpt" runat="server" OnItemCommand="rpt_ItemCommand"
OnItemDataBound="rpt_OnItemDataBound">
<ItemTemplate>
<asp:Panel ID="Pnl" runat="server">
<div class="tooltip" style="display: none">
<div style="text-align: center; font-weight: bold;">
<%# Eval("Name") %><br />
</div>
<table align="center">
<tr>
<td>
<div style="font-weight: normal">
Calls
</div>
</td>
<td>
<div style="font-weight: normal">
Success
</div>
</td>
<td>
<div style="font-weight: normal">
Error
</div>
</td>
</tr>
<tr>
<td>
<div style="text-align: center; font-weight: normal">
<%# Eval("TotalCalls")%>
</div>
</td>
<td>
<div style="text-align: center; font-weight: normal">
<%# Convert.ToInt32(Eval("TotalCalls")) - Convert.ToInt32(Eval("ErrorCalls"))%>
</div>
</td>
<td>
<div style="text-align: center; font-weight: normal">
<%# Eval("ErrorCalls")%><br />
</div>
</td>
</tr>
</table>
<div style="text-align: center; font-weight: normal">
Success Rate =
<%# ((decimal)Eval("PassPercentage") == -1) ? "0.0 %" : Eval("PassPercentage") + "%"%>
</div>
</div>
</li>
</asp:Panel>
</ItemTemplate>
</asp:Repeater>
我收到以下错误:
JavaScript runtime error: Object doesn't support property or method 'tooltip'
有没有办法解决这个错误?