2011-08-25 278 views
2

我使用這個tooltip是jQuery的基礎上的網頁,其中有一個jQGrid元素。 工具提示適用於頁面中所有非jQgrid元素。 我正在嘗試將工具提示應用到網格的列,以顯示從沒有成功的ajax調用返回的特定數據。 工具提示設置爲使用「標題」關鍵字。 這裏是我使用的是什麼,使電網:jQGrid與jQuery的工具提示工具

var myGrid = jQuery("#clients_lingots"); 
myGrid.jqGrid({ 
url:'lingots.php', 
datatype: 'xml', 
height:700, 
mtype: 'GET', 
deepempty:true , 
colNames:['Nom client'], 
colModel :[ 
    {name:'Name', index:'Name', width:1600,align:'left'}, 
      ], 

rowNum:3000, 
pager: '#pager_clients_lingots', 
sortname: 'Name', 
sortorder: 'asc', 
viewrecords: true, 
caption: 'Clients lingots', 
....etc 

在從服務器返回的數據(一些SQL querys)我已經把一個細胞就像

$s .= "<cell>&lt;a title='Date creation:".$datecreation."Derniere modification:'>".$qualite."&lt;/a></cell>"; 
我lingots.php文件

返回一個像<a title='some info for the tooltip from db">data.for.the.cell</a>這樣的單元格,認爲工具提示可以工作。

我認爲工具提示檢測ajax調用數據時有問題。 我不知道如何解決這個問題。 任何想法? 謝謝

回答

0

請嘗試語法。 標題= 或 標題「從數據庫工具提示一些信息」 =

「從分貝提示一些信息:」如果你開始「」或「」;覈實。

+0

不,這是行不通的既不與「或與」。 – mirku

0

好吧,我發現使用類似下面的例子中,gridComplete功能和停用在colModel屬性中的「標題」屬性附加傷害像我這樣的回答「稱號:假」:

gridComplete: function(){$("[title]").tooltip({position: "bottom right",effect: 'slide'});}