I am using jQuery. How do I get the path of the current URL and assign it to a variable?
Example URL:
http://localhost/menuname.de?foo=bar&nu
If you want to get the path of the root site, use this:
$(location).attr('href').replace($(location).attr('pathname'),'');