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(\
if the url is http://localhost/madukaonline/shop.php?shop=79
http://localhost/madukaonline/shop.php?shop=79
console.log(location.search); will bring ?shop=79
console.log(location.search);
?shop=79
so the simplest way is to use location.search
you can lookup for more info here and here