Bootstrap 4.0 current git no longer works in WordPress TypeError: $ is undefined
Created by: nextgenthemes
I had this working before. I enqueued the scripts in a correct way but now it no longer works.
This may have to do with the fact that WP loads jQuery in noConflict mode and BS assumes $ to be jQuery? Or with the recent rewrites?
How can I fix this?
I have outdated code running on nextgenthemes.com where this issue is also present.
Firefox Errors:
TypeError: $ is undefined[Weitere Informationen] bootstrap.js:88:5
TypeError: $(...).tooltip is not a function[Weitere Informationen]
Chrome errors:
Uncaught TypeError: Cannot read property 'fn' of undefined
at setTransitionEndSupport (bootstrap.js:88)
at bootstrap.js:151
at bootstrap.js:153
at bootstrap.js:3836
s.js:17 Uncaught TypeError: $(...).tooltip is not a function
Tried to reproduce this in JSbin with the old jQuery 1 version but that works fine.
This is it basically what I have running with everything else cut.
<!DOCTYPE html>
<html lang="en-US">
<head>
<script type='text/javascript' src='https://nextgenthemes.dev/wp-includes/js/jquery/jquery.js?ver=1.12.4'></script>
</head>
<body>
<script type='text/javascript' src='https://nextgenthemes.dev/wp-content/themes/s/node_modules/popper.js/dist/umd/popper.js?ver=1.12.5'></script>
<script type='text/javascript' src='https://nextgenthemes.dev/wp-content/themes/s/node_modules/bootstrap/dist/js/bootstrap.js?ver=v4.0.0-beta'></script>
<-- script that uses tooltips -->
</body>
</html>