Skip to content

Instantly share code, notes, and snippets.

@spdustin
Created October 31, 2012 15:15
Show Gist options
  • Save spdustin/3987591 to your computer and use it in GitHub Desktop.
Save spdustin/3987591 to your computer and use it in GitHub Desktop.
WIP - Decorate the Body
var bodyClass =
"site"
+ _spPageContextInfo.siteServerRelativeUrl.replace(/\W/g, "-");
bodyClass +=
" web"
+ _spPageContextInfo.webServerRelativeUrl.replace(/\W/g, "-");
document.body.className += " " + bodyClass;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment