So I have been trying out Google's API libraries and I have to admit it is worth taking a look at. Basically you just need to sign up for an API key through http://code.google.com/ and once you have your own API key you can include at the top of your webpage the following script tag:
<script type="text/javascript" src="http://www.google.com/jsapi?key=INSERT-YOUR-KEY"></script>
where INSERT-YOUR-KEY is the API key you get when you sign up. Once you have included this script you can just simply use google.load() like this:
google.load("jquery", "1.3.5");
if you want a specific version. If you just want to use the most recent version you can use something similar to
google.load("jquery", "1.4");
Some of the more popular libraries that are out there are:
Dojo, jQuery, MooTools, script.aculo.us, and YUI.
That's it! It really makes managing the more popular libraries so much easier than having to keep track of the recent version on your server. The only word of caution is to remember that these are case-sensitive so make sure that you pay attention to the case of your text.
No comments:
Post a Comment