Php 带有jquery工具提示工具的jQGrid
我使用的是jQuery,它基于一个包含jQGrid元素的网页。 工具提示适用于页面中的所有非jQgrid元素。 我试图将工具提示应用于网格的列,以显示从ajax调用返回的特定数据,但没有成功。 工具提示设置为使用“title”关键字。 下面是我用来制作网格的示例:Php 带有jquery工具提示工具的jQGrid,php,jquery,sql,jqgrid,tooltip,Php,Jquery,Sql,Jqgrid,Tooltip,我使用的是jQuery,它基于一个包含jQGrid元素的网页。 工具提示适用于页面中的所有非jQgrid元素。 我试图将工具提示应用于网格的列,以显示从ajax调用返回的特定数据,但没有成功。 工具提示设置为使用“title”关键字。 下面是我用来制作网格的示例: var myGrid = jQuery("#clients_lingots"); myGrid.jqGrid({ url:'lingots.php', datatype: 'xml', height:700, mtype: 'GET'
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查询)返回数据的lingots.php文件中,我放置了如下单元格
$s .= "<cell><a title='Date creation:".$datecreation."Derniere modification:'>".$qualite."</a></cell>";
$s.=“a title='Date creation:”.$datecreation.“Derniere修改:”>“$qualite.”/a>”;
要返回类似的单元格,请尝试使用语法。
title='db工具提示的一些信息'
或
title=“数据库中工具提示的一些信息”
如果以“”或“”开头;检查它。请尝试使用语法。
title='db工具提示的一些信息'
或
title=“数据库中工具提示的一些信息”
如果以“”或“”开头;检查它。好的,我自己已经找到了答案,使用gridComplete函数(如以下示例)并在colModel属性(如“title:false”)中禁用“title”atribute:
好的,我自己使用gridComplete函数(如以下示例)找到了答案,并在colModel属性(如“title:false”)中禁用了“title”atribute:
gridComplete: function(){$("[title]").tooltip({position: "bottom right",effect: 'slide'});}