How do I get the last segment of a url? I have the following script which displays the full url of the anchor tag clicked:
$(\".tag_name_goes_here\").live(\
To get the last segment of your current window:
window.location.href.substr(window.location.href.lastIndexOf('/') +1)