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
// get current URL $(location).attr('href'); var pathname = window.location.pathname; alert(window.location);