SharePoint 2010 - javascript to hide the SharePoint ribbon

Here is some javascript, for SharePoint 2010, to hide the SharePoint ribbon.

This is useful inside a popup window.

 //hide the SharePoint ribbon (for example, inside a popup window)  
 HideSharePointRibbon = function() {  
   $('#s4-ribboncont').hide(); //hide the Page button  
   $('#s4-ribbonrow').hide(); //hide the ribbon row  
 }  

Tested in Google Chrome, IE8.

Comments