I spent a lot of time searching for jQuery code snippet that could fetch the current url path from where the jQuery file is executed. But jQuery method $(location).attr('protocol') + "//" + $(location).attr('host'); fetches the url of the current page.
Get the path of executed Javascript file
![Get the path of executed Javascript file Ajax Pagination](https://techlister.com/wp-content/uploads/2012/11/source.jpg)