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
You can log window.location and see all the options, for just the URL use:
window.location.origin
for the whole path use:
window.location.href
there's also location.__
.host .hostname .protocol .pathname