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
I have this to strip out the GET variables.
var loc = window.location; var currentURL = loc.protocol + '//' + loc.host + loc.pathname;