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
var getUrl = window.location; var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];