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 need the hash parameters present in the URL, window.location.href may be a better choice.
window.location.href
window.location.pathname => /search window.location.href => www.website.com/search#race_type=1