Treehouse: Grow your CSS skills. Land your dream job.

jQuery local

  • # May 4, 2010 at 4:51 am


    I have a trouble running jQuery on my local server on my computer. I have mysql and Apache running and working. But i get the error Uncaught ReferenceError: jQuery is not defined when I open the page.

    < !DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"

    The page works fine when i run it from "the folder" (not with the server) but since I what to be able to use Ajax functions i need to make i work on my local server as well.

    # May 4, 2010 at 6:11 am

    You have links to 2 scripts there:

    <script src="/js/jquery-1.4.2.min.js" …
    <script src="js/colorbox/jquery.colorbox-min.js" …

    Notice you have a "/" at the start of the first one, which is your jQuery lib – I would try removing that first and see what happens :)

    # May 4, 2010 at 6:23 am

    It didn’t work. But i solved the problem by linking the script from google instead. Have no idea why it didn’t work with the local file. Thanks anyway.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.