Tuesday, March 20, 2012

Jquery error, Uncaught ReferenceError: class2type is not defined

This is an entry-level error you might get when you try put Jquery into you web. if you use chrome. the error looks like this in the console tab of the developer tools.
image

the error means the method is not available when some anonymous function are invoked in the Jquery-UI lib.

image 

So, why? there is standard jquery functions. the answer is short, when you call this anonymosu function, the calss2type function is not there yet. here is my script including order,
image

when 2 was loaded, it’s dependency lib which is 3 is not loaded yet.  drag line 3 before 2, will address the issues.

image

Hope this helpsSmile

No comments:

 
Locations of visitors to this page