Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

HTML in tab text

$
0
0

I'm unable to add html to the tab text. It outputs the html code.

            var tabHeader = value["AddressTypeDescription"];
            var tab = $('<div>').attr('name', tabHeader);
            $(tabpanel.contentHolder(0)).children().clone().appendTo(tab);
                        
            var vm = kendo.observable(value);
            kendo.bind(tab, vm);

            //Need to do this otherwise the input values will not get passed
            tab.children().find('input').each(function () { $(this).attr('value', this.value);})
            
            //renders html code
            var closeButton = "<span unselectable='on' class='k-icon k-delete'>delete</span>";
            tabpanel.insertAfter({
                text: tabHeader+' '+ closeButton,
                content: tab.html()
            }
                , tabpanel.tabGroup.children(":nth-last-child(2)")
            );

 

This is the output:

Company <span unselectable='on' class='k-icon k-delete'>delete</span>


Viewing all articles
Browse latest Browse all 94857

Trending Articles