title: Getting jquery plugin's hosted url
body: <p>I'm currently writing a jQuery plugin that I'd like to host on my site for others to use and include. </p>
  
  <p>How do I get the hostname root of the plugin's location?</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://myhost.com/scripts/myplugin.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I was wondering how myplugin.js would be able to retrieve it's OWN location's hostname despite being possibly included on another website. So if one would include that script source on their website, myplugin.js would still be able to retrieve <a href="http://myhost.com" rel="nofollow">http://myhost.com</a></p>
  
  <p>This would make. window.location an invalid choice right?</p>