In joomla php there I can use $this->baseurl
to get the base path, but I wanted to get the base path in jquery.
The base path may be any of the following example:
http://www.example.com/
http://localhost/example
http://www.example.com/sub/example
The example
may also change.