我目前正在與jQuery Tools Tooltip打交道。它的工作原理與IE8/Firefox一樣,但客戶端也需要它在IE6中工作。從我在他們的網站上看到的所有內容,以及它在項目中其他地方都可以使用的事實,我知道它與IE6兼容。IE6中的jQuery工具提示
我相信掛斷是因爲我將工具提示附加到AJAX生成的錶行列表。到目前爲止,我已經嘗試了這兩種方式,這兩種方式似乎都適用於IE8/Firefox,而這兩種方式都不適用於IE6。
嘗試1:
$(document).ready(function() {
// get the undeclared additions and populate the table
$.getJSON("/Drm/Pc/GetUndeclaredAssistanceRecords?partnumber=<%= Model.PartNumber %>",
function(data) {
var rowEntry = "";
var rowClass = "odd";
for (var i = 0; i < data.length; i++) {
// Fix for Bug 71 starts
strComment = "";
for (var k = 0; k < data[i].Comment.length; k++) {
if (data[i].Comment.substring(k, k + 1) == "'")
strComment = strComment + "";
else
strComment = strComment + data[i].Comment.substring(k, k + 1);
}
strComment = strComment.replace(";", ",");
strComment = strComment.substring(0, 400);
var rowEntry = "<tr class='" + rowClass + "'><td class='pcassistresultsCenterAlign'>" + data[i].PurchaseOrder + "</td><td class='pcassistresultsLeftAlign'>" + data[i].SupplierName + "</td><td class='pcassistresultsCenterAlign'>" + data[i].Amount + "<td class='pcassistresultsCenterAlign'>" + data[i].RecordType + "</td></tr>";
rowEntry = rowEntry + "<tr class='" + rowClass + "'><td class='pcassistresultsDetailTitle'>Shipment Date:</td><td>" + data[i].ShipDate + "</td><td class='pcassistresultsDetailTitle'>Input On:</td><td class='pcassistresultsDetailData'>" + data[i].InputOn + "</td></tr>";
rowEntry = rowEntry + "<tr class='" + rowClass + "'><td class='pcassistresultsDetailTitle'>Req Recon:</td><td class='pcassistresultsDetailData'>" + data[i].ReqRecon + "</td><td class='pcassistresultsDetailTitle'>Input By:</td><td class='pcassistresultsDetailData'>" + data[i].InputBy + "</td></tr>";
rowEntry = rowEntry + "<tr class='" + rowClass + "'><td class='pcassistresultsDetailTitle'>From Site</td><td class='pcassistresultsDetailData'>" + data[i].FromSite + "</td><td class='pcassistresultsDetailTitle'>Input By Phone:</td><td class='pcassistresultsDetailData'>" + data[i].InputByPhone
rowEntry = rowEntry + "<tr class='" + rowClass + "'><td class='pcassistresultsDetailTitle' valign='top'>Comment:</td><td colspan='3' rowspan='2' title='" + strComment + "' ><div style='overflow:hidden; height:30px;'>" + data[i].Comment + "</div></td></tr>";
rowEntry = rowEntry + "<tr class='" + rowClass + "'><td> </td></tr>";
//Fix for Bug 71 ends
$('#unDecAddTable tbody>tr:last').after(rowEntry);
rowClass = rowClass == 'odd' ? 'even' : 'odd';
}
$('#unDeclaredAdditions *').tooltip();
});
});
嘗試圖2是與上述相同,但除去了.tooltip()片和下面的代碼的document.ready功能以外添加
function PinTooltips() {
$('#unDeclaredAdditions *').tooltip();
$('#declaredAdditions *').tooltip();
}
$('#declaredAdditions').ajaxComplete(function(event, request, settings) {
PinTooltips();
});
不任何人都可以看到我出錯的地方,或者知道IE6的一些不尋常的事情,這會阻止它工作?