Using Google-hosted jQuery library

Written by stevey on August 9th, 2010

Nice thing about using Google hosted jQuery is that I could call jQuery lib from anywhere and take advantage of versioning  and compression maintenance work done by Google. According to some source, the better caching provided by Google actually speed up the loading of the javascripts.

For example, below is a dialog box that uses jQuery UI hosted at Google. Click on the link to see it in action.

Show Dialog

Source code:

<link href=”” rel=”stylesheet” type=”text/css” />
<script src=””></script>
<script src=””></script>
<script type=”text/javascript”>
function showDialog() {

$(“#dialog”).dialog({autoOpen:false, modal:true,buttons: {OK:function(){$(this).dialog(‘close’); }}});




<div id=”dialog” title=”hello dialog”></div>


Leave a Comment