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!!