JSP introduced Bootstrap, bootstrap-validator after the occurrence of XXX is not a function of the problem and solution! __js

Source: Internet
Author: User
Tags jquery library

Recently do a project, in writing backstage, encountered a problem, first in the JSP introduced Bootstrap and Bootstrap-validator (form verification), encountered a problem, is in the runtime, the error

You are prompted to write JS, there is no this method, but bootstrap in the introduction of the JS,CSS are introduced, why also want to report this mistake, and then slowly wrong, finally found the root cause,

In my JSP interface, I have introduced other files:

But there's nothing wrong with the label, the problem is not here, open this include-navbar.jsp file to see, the focus here:


I introduced the jquery library in this JSP interface, but look at one of our previous interfaces,


Visible, the JSP interface also introduced jquery, which led to the secondary JSP interface in the <jsp:include page= "/web-inf/jsp/include-navbar.jsp"/> introduced in the JSP interface, also with jquery , and the main interface into the conflict, resulting in an error: Uncaught typeerror: $ (...). Bootstrapvalidator is not a function

The solution: to introduce the jquery in the JSP interface introduced by the label <jsp:include .../> (include tag introduced to the jquery library directly using the main interface).

PS: When using Bootstrap-table, the method that needs to be used----$ (' table '). Bootstraptable (' methods '); is also true.

Related Article

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.