Search code examples
javascriptjqueryhostinghost

turning on jquery?


I have website A: http://dl.dropbox.com/u/3264697/calc/v2/index.html It is working as intended, 100%.

I have website B: http://pe2kasb.net63.net/ It is not working as intended. Website B is a file for file mirror of A.

I assume then, this is something wrong with the host. Looking at the Javascript console, the error appears to be related to the host:

screenshot here http://img825.imageshack.us/img825/4782/unlednwe.png

Need I contact them, or is there something I can do...? I'm new to JQuery, and I believe that's what is the root of the issue but... i'm not sure.


Solution

  • You are loading JQuery from ../v2/media/js/jquery.js which does not seem to exist...

    To solve the issue and improve the speed of the website

    1. do not store JQuery on the server, rather load it from a 3rd party (Google works well)
    2. use JQuery minified version

    To load JQuery from Google you can just use:

    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">
        google.load("jquery", "1");
    </script>
    

    More information here

    EDIT: note that the above automatically loads the minified version of JQuery. If, for whatever reason (?) you wanted to load the uncompressed version you could use

    google.load("jquery", "1", {uncompressed:true});