In joomla php there I can use $this->baseurl to get the base path, but I wanted to get the base path in jquery.
$this->baseurl
The base path may be any of the follo
This will get base url
var baseurl = window.location.origin+window.location.pathname;