我正在玩this jquery seating chart plugin。您可以在地图中的集合中设置标签,如下所示:
map: [
'aa[,This is the label for this entry]aaaaaaaaaa',
'aaaaaaaaaaaa',
或“getlabel()”函数如下:
getLabel : function (character, row, column) {
return character + " is my label";
}
但我想知道是否有能力将html作为标签而不是原始文本返回? (我尝试在上面的任何一种方法中坚持使用某些html表,但似乎都不起作用。
查看插件中的注释,我看到了:
* Allowed characters in labels are: 0-9, a-z, A-Z, _, ' ' (space)
但似乎有人想要做的一个显而易见的基本事情就是将html放入这个标签中,因为它所做的就是将它推入div中。
答案 0 :(得分:1)
在jQuery-Seat-Charts 1.1.0的副本中(完整版或缩小版),
.text(fn.settings.label)
.html(fn.settings.label)
从函数naming.getLabel
返回的HTML将被尊重。