Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Add body class based on the url */
- var loc = window.location.pathname.match(/^\/?(\w+)\b/);
- if(loc) {
- $(document.body).addClass("page-" + loc[1].toLowerCase());
- } else {
- $(document.body).addClass("page-front");
- }
Add Comment
Please, Sign In to add comment