I need to change the style of each page dynamically based on the page the user is on.
To do this I plan on taking the URL of the page being visited, stripping out some bits and pieces, and apply then apply the rresult to the <body>
tag. This will then allow me to style based on the name of the page.
The URL I have looks something like:
http://dan.manfredman.net/site/user/location/home.php
http://dan.manfredman.net/site/user/location/profile.php
http://dan.manfredman.net/site/user/location/users.php
I need only 'home', 'profile', 'users', how can I use JQuery to remove the .php from the file name and then apply the remaining 'home', 'profile', 'users' to the body tag based on the page there visiting?