Sign In
Password Recovery Register

jQuery & jQuery UI from Google CDN w/ Fallback to Local

No description :/

 1 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
 2   <script type="text/javascript">
 3     if (typeof jQuery == 'undefined'){
 4       document.write('<script src="<?php bloginfo( 'template_directory' ); ?>/js/libs/jquery-1.6.2.min.js"><\/script>');
 5     }
 6   </script>
 7   <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.15/jquery-ui.min.js"></script>
 8   <script type="text/javascript">
 9     if (typeof jQuery.ui == 'undefined') {
10       document.write('<script src="<?php bloginfo( 'template_directory' ); ?>/js/libs/jquery-ui-1.8.15.min.js"><\/script>');
11     }
12   </script>

Comments

Login or Register to comment.


Embed Me!

Feel free to adjust iframe width and height according to your needs.

<iframe width="800px" 
        src="http://www.emoticode.net/embed/javascript/jquery-jquery-ui-from-google-cdn-w-fallback-to-local.html" 
        height="400px" 
        frameborder="0"> 
</iframe>

Here's how it will look like.