JQuery Is Not Defined

This is a common error for users implementing JQuery UI. Usually if you see this message, this could mean a few things:

– There is a syntax issue or bad link referencing the JQuery (min/full) JS. Use your debuggers to make sure the JS is loading.

– Similar to above this could also mean the JS cannot be loaded due to being contained in a folder which the site does not have permission to.

– If you are debugging locally and referencing the JQuery JS on an external site, make sure you have internet access and that the site which you are referencing to is up.

– The arrangement of script references may be in the wrong order. JS loads on runtime, so dependencies are important in placement of the script reference on the page. JQuery UI depends on JQuery(min), so (min) must be declared first or you will encounter the error.

As always, Firebug and other web development debuggers such as the one’s built into Chrome and IE are great tools to help you identify and resolve issues such as these.

Hope this may lighten someone’s day. 🙂

    <script src="../JQuery/js/jquery-1.4.4.min.js" type="text/javascript"></script>

    <link href="../JQuery/css/smoothness/jquery-ui-1.8.7.custom.css" rel="stylesheet"
        type="text/css" />

    <script src="../JQuery/js/jquery-ui-1.8.7.custom.min.js" type="text/javascript"></script>

References:
Firebug, http://getfirebug.com/
JQuery UI, http://jqueryui.com/

Advertisements

About Ronnie Diaz

Ronnie Diaz is an enterprise software engineer responsible for front-end and back-end development for companies in many industries. Heavily involved in cloud development, online retail, e-commerce and electronic ordering, fulfillment and customer relational systems.

Posted on December 27, 2010, in Programming & Development and tagged , , , , , , , , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: