[TB] [JS] Resolve error: $ (...). Collapse is not a function | | <script> order problem!!

Source: Internet
Author: User

Change someone's front-end code today, obviously all the collapse is written according to the official website, but execution is an error:

$ ("#abc"). On (' Show.bs.collapse ', function () {});

Not even working,

and execute $ ("#abc"). Collapse ("show");

Unexpectedly error: $ (...). Collapse is not a function

>> Solutions: The order of <script> is quite a statement!!!!!!

Based on Https://stackoverflow.com/questions/35600483/bootstrap-collapse-not-working-with-jquery

It is found that the cause is:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>

Caused by!!!

# # Finally, after the last jquery <script> was erased, it worked!!!!!!
 

[TB] [JS] Resolve error: $ (...). Collapse is not a function | | <script> order problem!!

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.