how to get the url of the page in jquery code example Example: jquery get URL slug var pathname = window.location.pathname;