Jquery 剑道UI工具提示显示,访问目标?
通过将参数e传递给内容的匿名函数,可以访问目标Jquery 剑道UI工具提示显示,访问目标?,jquery,kendo-ui,kendo-tooltip,Jquery,Kendo Ui,Kendo Tooltip,通过将参数e传递给内容的匿名函数,可以访问目标 gridToolTipz = $('#grid').kendoTooltip({ filter: "td[role=gridcell]", content: function (e) { var target = e.target; // the element for which the tooltip is shown ... }, show: function(
gridToolTipz = $('#grid').kendoTooltip({
filter: "td[role=gridcell]",
content: function (e) {
var target = e.target; // the element for which the tooltip is shown
...
},
show: function(e) {
var target = e.target; // the element for which the tooltip is shown
...
}
});
有可能在表演中实现同样的效果吗?上述代码不起作用。您始终可以通过调用以下命令来访问目标元素: 请参见演示:
var toolTip = $('#grid').kendoTooltip({
filter: "td[role=gridcell]",
content: function (e) {
var target = e.target; // the element for which the tooltip is currently shown
return "Content is: " + target.text(); // use current element for content
},
show: function (e) {
var target = this.target(); // the element for which the tooltip is currently shown
if (target) {
console.log("now showing with content: ");
console.log(target.text());
}
}
}).data("kendoTooltip");