Reputation: 41
I'm working on an app where I use both Bootstrap 4 and JQueryUI (namely, the draggable & droppable features).
Thus far it's worked fine, but now when I'm trying to use Bootstrap and JQuery to display modals, like so:
$("#modal1").modal({});
I get a console error saying $(...).modal is not a function. So I figured my JQuery loading script is in the wrong place, but moving it around, such as before the Bootstrap css and scripts, results in a bunch of errors of this sort:
Uncaught TypeError: $(...).draggable is not a function
and draggable is a JQueryUI function.
Does my head tag look alright or what's up? Why doesn't Bootstrap want to co-operate with me?
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link href="https://fonts.googleapis.com/css?family=Noto+Sans|Ubuntu:700" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
Let me know if I need to provide any more details. Thanks!
Upvotes: 1
Views: 10299
Reputation: 431
you are loading jquery twice remove this :-
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
Upvotes: 2