Use Google Hosted JQuery and Javascript Libraries in Your Projects

October 13th, 2012 by Laeeq | No comments

Now Google started hosting of most popular libraries in large scale such a JQuery, Dojo, Moo Tools, Prototype, SWFObject, WebFont Loader, script.aculo.us, jQuery UI,  AngularJS and open-source JavaScript libraries. The hosted libraries provide access to a growing list of the most popular, open-source JavaScript libraries. You can simply load library to your site by using <script src=”….”></script> tag.

The Google Hosted Libraries provides your applications with stable, reliable, high-speed, globally available access to all of the most popular, open-source JavaScript libraries. Now there is no need to download and host library files. Just use the Google hosted library link. Below are the steps to use most popular libraries with the library link in your project.

Load JQuery from Google hosting

if you want to load JQuery in your project using Google hosting, copy and paste the following code:

  1. <script src=“//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js”>
  2. </script>

Load JQueryUI from Google hosting

if you want to load JQueryUI in your project using Google hosting, copy and paste the following code:

  1. <script src=“//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js”>
  2. </script>

Load MooTools from Google hosting

if you want to load MooTools in your project using Google hosting, copy and paste the following code:

  1. <script src=“//ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools-yui-compressed.js”>
  2. </script>

Load Prototype from Google hosting

if you want to load Prototype in your project using Google hosting, copy and paste the following code:

  1. <script src=“//ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js”>
  2. </script>

Load script.aculo.us from Google hosting

if you want to load script.aculo.us in your project using Google hosting, copy and paste the following code:

  1. <script src=“//ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js”>
  2. </script>

Load SWFObject from Google hosting

if you require to load SWFObject in your project using Google hosting, copy and paste the following code:

  1. <script src=“//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js”>
  2. </script>

Load WebFont Loader from Google hosting

if you want WebFont Loader in your project using Google hosting, copy and paste the following code:

  1. <script src=“//ajax.googleapis.com/ajax/libs/webfont/1.0.31/webfont.js”>
  2. </script>

Load AngularJS from Google hosting

if you want to add AngularJS in your project using Google hosting, copy and paste the following code:

  1. <script src=“//ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js”>
  2. </script>

Load Chrome Frame from Google hosting

if you want to add Chrome Frame in your project using Google hosting, copy and paste the following code:

  1. <script src=“//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js”>
  2. </script>

It’s a fantastic approach by Google to support popular libraries and also escaped us from downloading and hosting headache.

You can subscribe to PHPZAG.COM posts by Email

 

Related Topics:

  • Check if a string starts with http using Javascript
  • Hide and Show a Div Using Javascript
  • Detect Web Browser using Javascript
  • 11 Popular JavaScript Frameworks That Can Make You a Better Web Developer
  • Jquery Basics Part-1 How to add jQuery to your website
  •  

     

    1. No comments yet.
    1. No trackbacks yet.