How to get and set the contextual tab name in Ribbon component?
The Ribbon component provides a separate class for each inner-level element in the ribbon elements. For contextual tab element, it provides the “.e-contextliset .e-contextual .e-contextualtabset” class, so you can use this class to identify the corresponding element and make your necessary process like to get or set the contextual tab name. The following code example demonstrates how to get and set the contextual tab name in the Ribbon component.
function changeContextualTabName() {
//Create Instance for Ribbon Element
var ribbonObj = $("#Ribbon").ejRibbon("instance");
//Get all contextual Tab Elements
var ctabElements = ribbonObj.element.find(".e-contextliset .e-contextual .e-contextualtabset .e-link");
for (var i = 0; i < ctabElements.length; i++) {
//Validate Tab Text
if (ctabElements[i].text == "DESIGN") {
//Change the Tab text
ctabElements[i].text = "MYDESIGN";
}
}
}