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(\
Building on Frédéric's answer using only javascript:
var url = document.URL window.alert(url.substr(url.lastIndexOf('/') + 1));