R
R
Roman2019-03-01 13:45:27
JavaScript
Roman, 2019-03-01 13:45:27

Why does the Dropdown button stop working if I include CDN versions of jQuery and Popper.js in Bootstrap?

Hello.
If I have just JS from Bootstrap connected like this:

<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

then the Dropdown button works fine. But if I include CDN versions of jQuery and Popper.js as written on their site: If you're using our compiled JavaScript, don't forget to include CDN versions of jQuery and Popper.js before it.
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

Then the dropdown stops working.
What to do? I need jQuery too.
Thank you.
I place the code before the closing one.
</body>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2019-03-01
@procode

Found the reason. It turned out that this is a library from Laravel, which was included in the head:
removal solved the issue.
True, it is not entirely clear what to do then, if suddenly it is needed. I understand that there is Vue ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question