Is there a version of jQuery somewhere that I can hotlink to without hosting the file?
Asked Answered
J

6

15

Just wondering if there's a website out there that allows you to hotlink to the latest version of jquery. Does Google code allow you, or does jQuery.com itself?

What I'm not looking for is a site that just happens to have jQuery that I can pinch. I want a site that says that you can hotlink to their jQuery.

Julietjulieta answered 5/9, 2009 at 14:28 Comment(1)
A few sites do this. You'll want to search for hosted jQuery google.ca/search?q=hosted+jQueryMineral
M
33

Yes, it's available on Google's CDN.

Everything you need is here: http://code.google.com/apis/libraries/

You can link directly to the javascript file: https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js

or use the google.load method


Update

Its also available on Microsoft's CDN or the jQuery CDN

Martell answered 5/9, 2009 at 14:30 Comment(2)
The Google code link is broken, Google seems to have moved it to a different URL.Psoriasis
Fun update: the cert for code.jquery.com expired today, so a lot of people hotlinking from there are having site problems.Synonymy
E
10

You can have google host it in 1 of 2 methods.

Method 1

<script type="text/javascript" 
        src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
  // You may specify partial version numbers, such as "1" or "1.3",
  //  with the same result. Doing so will automatically load the 
  //  latest version matching that partial revision pattern 
  //  (i.e. both 1 and 1.3 would load 1.3.2 today).
  google.load("jquery", "1.3.2");

  google.setOnLoadCallback(function() {
    // Place init code here instead of $(document).ready()
  });
</script>

Method 2 (more common)

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

I know jquery.com host's the file as well for users, they might have redirected there jquery hosting to use the google version though.

Expansive answered 5/9, 2009 at 15:11 Comment(0)
A
3

Microsoft is now hosting jQuery as well: http://www.asp.net/ajax/cdn/#4

Anton answered 13/10, 2009 at 7:14 Comment(0)
P
3

In addition to JQuery, Google CDN also hosts JQueryUI and all the default Themeroller CSS UI themes (including images!). If you're planning to build a UI from JQuery this is pretty clutch.

http://encosia.com/2009/10/11/do-you-know-about-this-undocumented-google-cdn-feature/

Parve answered 18/6, 2010 at 20:27 Comment(0)
H
2

Google hosts jquery for you.

http://code.google.com/apis/ajaxlibs/documentation/index.html#jquery

Headstall answered 5/9, 2009 at 14:31 Comment(0)
S
2

jQuery now allows you to use their site, as their download page suggests.

http://code.jquery.com/jquery-1.6.2.min.js

Soerabaja answered 4/8, 2011 at 0:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.