解决Uncaught TypeError: Cannot read property ‘fn’ of undefined
文章目录
引入bootstrap 控制台报错
问题回顾
今天用bootstrap4
的时候内置的插件点击完全没反应,console也同时报错
Uncaught TypeError: Cannot read property 'fn' of undefined
解决方案
查找发现是因为在头部引入外部样式与js库的时候顺序不对
要求是jQuery
必须在bootstrap.js
或其他js之前引入
<!-- Bootstrap -->
<link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css