Search This Blog

Total Pageviews

Tuesday, August 8, 2017

Show Sharepoint Ribbon on page Load

setTimeout(function() {
var elem = document.getElementById("MSOZoneCell_WebPartWPQ2");
if(elem != null) {
var dummyevent = new Array();
dummyevent["target"] = elem;
dummyevent["srcElement"] = elem;
}, 100);

The above script will invoke the ribbon by default in IE( for the specific webpart), incase if you added multiple webparts.

No comments:

Post a Comment