Change Item Name of Kendo PanelBar

684 views Asked by At

I cannot change the name of the first item. Using the below example works well on the second item and so on, but I cannot change the name of the first item, only subsequent items? How can I access the first item using jQuery. Tried li:nth(0)

var li = panelbar.wrapper.find("> li:nth(1) span.k-link.k-header");
// Replace the content by "Title"
li.contents().first().replaceWith("Title");

You can see it here : http://dojo.telerik.com/@OnaBai/Uzugu

1

There are 1 answers

6
omikes On

For the first line use the first selector ":first"

var li = panelbar.wrapper.find("> li:first span.k-link.k-header");
// Replace the content by "Title"
li.contents().first().replaceWith("Title");