Js $is not a function problem solution

  • 2020-03-30 01:23:36
  • OfStack

Today, while working on a project, I came across a very strange problem. I in the HTML program, run well, replace JSP in the project run, has been quoted $is not a function error. I've been looking for a long time. I've tried a lot. Later, it occurred to me that I would change the order of the js files I introduced, and introduce the js files of jquery first, followed by other js files. Really solved the problem!! Originally, the incoming files were loaded sequentially when the page was loaded. If the js file in jquery is not the first to be introduced, then the $. Method name in other js will report an error. Only by introducing the js file of jquery can the $. Method be executed correctly. Hereby backup!

< img SRC = "border = 0 / / files.jb51.net/file_images/article/201401/20140120160234.png? 20140201636 ">

Related articles: