Home > Web Front-end > JS Tutorial > Solution to the problem of js reporting $ is not a function_javascript skills

Solution to the problem of js reporting $ is not a function_javascript skills

WBOY
Release: 2016-05-16 17:03:18
Original
1644 people have browsed it

While working on a project today, I encountered a super strange problem. My program in html ran fine, but when I ran it in jsp in the project, it kept getting $ is not a function errors. I've been looking for it for a long time and tried a lot, but can't find a solution. Later, it suddenly occurred to me to change the order of the js files I imported. The js file of jquery was introduced first, and other js files were placed behind it. Really solved the problem! ! ! It turns out that when the page loads, the imported files are loaded sequentially. If the js file of jquery is not introduced first, then the $. method name in other js will report an error. Only when the js file of jquery is introduced first can the $. method be executed correctly. Backup hereby!

Solution to the problem of js reporting $ is not a function_javascript skills

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template