I am trying to hide the sidebar on administration pages in SP 2010. To do this, I am trying to use the following Javascript code which does not seem to be working.
$(document).ready(function () {
if(window.location.href.indexOf("_layouts") > -1) {
var elem = document.getElementById("v5-page-column-sidebar");
elem.style.display="none";
var elem2 = document.getElementById("v5-page-column-main");
elem2.style.width="100%;
}
});
Can anyone help out?