Tuesday, December 2, 2008

Google AJAX APIs and Libraries

Google have started hosting always-up-to-date script libraries via their Google AJAX APIs - http://code.google.com/apis/ajax/

This means they are hosting versions of jQuery, MooTools, Scripaculous etc. which are really helpful for developing JavaScript at a fraction of the time and effort. It allows cool effects (transitions, moving parts and the like) and many scripts online utilize these.

The API also allows taking advantage of Google Maps & Visualizations, which I'll go into detail about on a later post. To utilize Google AJAX APIs:

<script src="https://www.google.com/jsapi"></script>

* I recommend always use https - to ensure no problems when the page calling it is SSL protected.

Then to load, for example, jQuery, do the following:


<script>

google.load("jquery", "1.2.6"); // Load jQuery

</script>

jQuery is a great, simple to use library that is used to produce amazing effects such as those seen in this tutorial: http://malsup.com/jquery/cycle/ (the .js used here is ridiculously easy to plug-in)

No comments: