SyntaxFix
Write A Post
Hire A Developer
Questions
var path = location.pathname returns the path of the current URL (jQuery is not needed). The use of window.location is optional.
var path = location.pathname
window.location