有没有办法将HTML放在这个jQuery座位计划插件的标签中?

时间:2014-10-08 10:12:23

标签: jquery html

我正在玩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中。

1 个答案:

答案 0 :(得分:1)

在jQuery-Seat-Charts 1.1.0的副本中(完整版或缩小版),

  1. 找到.text(fn.settings.label)
  2. 替换为.html(fn.settings.label)
  3. 从函数naming.getLabel返回的HTML将被尊重。