I'm currently writing a jQuery plugin that I'd like to host on my site for others to use and include.
How do I get the hostname root of the plugin's location?
<script type="text/javascript" src="http://myhost.com/scripts/myplugin.js"></script>
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 http://myhost.com
This would make. window.location an invalid choice right?