Most people face this error when they use an outdated jquery.js . Sometimes this error also comes up when someone tries to use jquery in jsp.
The most important thing here that a person must do is first use an upto date version of jquery.js . Don't worry u don't even have to download this stuff.
Just have this :
instead of :