I am looking to develop a javascript web service that a website could include in one line of code similar to how google analytics is used. I would like to use jQuery in my javascript code, but I don't want it to conflict with any js libraries that may already be present on the hosting webpage.
Basically, inside the my main javascript file that an end user would include in their webpage, I would want to do something like:
document.write('<script type="text/javascript" ' +
'src="http://mydomain.com/js/jquery-1.4.2.min.js"></script>');
...to make jquery available within my code library. I'm wondering if this is the proper way to go about using jquery in a javascript api, or if there are more considerations to be made. I'd appreciate any examples or articles anyone can suggest.