Skip to content

Instantly share code, notes, and snippets.

@dustintheweb
Created August 22, 2013 17:47
Show Gist options
  • Save dustintheweb/6310500 to your computer and use it in GitHub Desktop.
Save dustintheweb/6310500 to your computer and use it in GitHub Desktop.
Inject the last part of the current page url into an object (class, id, etc)
var url = document.referrer,
urlsplit = url.split("/").pop();
$('body').addClass(urlsplit);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment