jquery in XXX is not a function or can not find $

Source: Internet
Author: User

In the project, encountered the above two errors, repeated toss for a long time, JS code write no problem, jquery file also introduced, is repeatedly reported errors, XXX is not a function.

This is the error, shake is not a function, I am also a dog, shake is clearly I in other JS files, the expansion of the method of jquery, how not function, handy hyperlink: jquery to achieve jitter effect

And then I found this post: $ is not defined error

Found in the comment area, answer the question:

Is the introduction of JS file order reversed, resulting in the above error, such as the following code:

    <script src="~/scripts/javascript1.js"></script>    <script src="  ~/scripts/jquery-1.7.1.js"></script>

When applied to jquery in the Javascript1.js file, it cannot be referenced before jquery, otherwise the above error occurs when calling methods in JavaScript1. You can adjust the order.

jquery in XXX is not a function or can not find $

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.