expand:"expandRibbon"
function expandRibbon(args)
{
$("#defaultRibbon").find(".e-expandcollapse span").removeClass("e-ribbonpinicon").addClass("e-rarrowup-2x");//to change the Ribbon state to pin
}
|
<input type="button" value="click to expand" onclick="expandClk(this)">
function expandClk(args)
{
var ribbonObj=$("#defaultRibbon").data("ejRibbon");
ribbonObj.collapse();//To collapse the Ribbon
ribbonObj.expand();//To expand the Ribbon
$("#defaultRibbon").ejRibbon({selectedItemIndex:2});//To set active tab }
|
$(function () {
$("#Spreadsheet").ejSpreadsheet({
..//
loadComplete: 'onloadComplete'
});
});
function onloadComplete(args) {
var ribElem = $("#Spreadsheet_Ribbon"), ribObj, activeContent;
ribObj = $("#Spreadsheet_Ribbon").data("ejRibbon"), tabObj = $("#Spreadsheet_Ribbon").data("ejTab");
activeContent = ribElem.find('.e-active-content');
activeContent.hide();
ribElem.find('li.e-active').removeClass("e-active").addClass("e-collapseactive e-select");
tabObj.option({ selectedItemIndex: 0 });
tabObj.model.selectedItemIndex = 0;
$("#Spreadsheet_Ribbon_togglebutton").removeClass("e-expanded").addClass("e-collapsed");
this.refreshSpreadsheet();
} |