簡體   English   中英

Kendo UI工具提示問題

[英]Kendo UI Tooltip issue

我正在使用Kendo UI MVC Asp.net工具提示控件來顯示格式化的數據。 但是工具提示不是顯示數據和格式,而是顯示HTML代碼。

太尖圖像

使用下面的代碼段顯示工具提示

TollTip('#calendar table tbody',“ #timeTemplate”,'td a.aCurrent',“ top”);

function TollTip(target, template, filter, position) {
$(target).kendoTooltip({
    filter: filter,
    content: kendo.template($(template).html()),
    position: position
});

}

在視圖上,我正在使用以下腳本片段。

<script id="timeTemplate" type="text/x-kendo-template">
            #if (target.data('title') != null) {#
            <p>
            #:target.data('title')#
            </p>
            #}#
</script>

我在代碼中缺少什么?

function TollTip(target, template, filter, position) {
    $(target).kendoTooltip({
        filter: filter,
        content: function(e) { kendo.template($(template).html())(e) } ,
        position: position
    });
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM