ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Installing jQuery

August 01, 2008 2:37am

Subscribe [10]
  • #16 / Oct 23, 2008 9:38am

    Ingmar

    29245 posts

    tuittu, what do you mean? You actually have the choice to point to a specific version, or the latest version. See here for more details.

    The versioning system allows your application to specify a desired version with as much precision as it needs. By dropping version fields, you end up wild carding a field. For instance, consider a set of versions:
    1.9.1
    1.8.4
    1.8.2
    Specifying a version of “1.8.2” will select the obvious version. This is because a fully specified version was used. Specifying a version of “1.8” would select version 1.8.4 since this is the highest versioned release in the 1.8 branch. For much the same reason, a request for “1” will end up loading version 1.9.1. Note, these versioning semantics work the same way when using google.load and when using direct script urls.

  • #17 / Oct 23, 2008 10:22am

    Riverboy

    2993 posts

    okey, i was thinking this only:

    http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js

    Cheers:
    - Tuittu

  • #18 / Jul 03, 2013 12:01pm

    walter.atg

    1 posts

    Hi George!, where did you put your js folder?

    Like Ingmar many people are linking to the files on Google’s servers as this has the advantage of caching the file for many of your visitors.

    You can also install the file on your local server. Put the js file is a /js/ folder and then link to it using

    <scr*pt type="text/javascript" src="/js/jquery-1.2.6.pack.js"></scr*pt>

    Then you need to create some JavaScript that uses jQuery. Personally I create another file in /js/. Make sure you include this file *after* the jQuery script. So it might look something like this:

    <scr*pt type="text/javascript" src="/js/jquery-1.2.6.pack.js"></scr*pt>
    <scr*pt type="text/javascript" src="/js/onDomLoad.js"></scr*pt>

    Put some code in the onDomLoad.js file to check it is working

    $(document).ready(function() {
    alert("Look Mum, I'm using jQuery!");
    });

    Reload the page and if the alert shows jQuery is ready to use!

    * Note as the EE forums strip out script tags make sure you change the sc*pt to script in the above code examples!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases