I'm newbie in the Amazing world, World of programming and developing web apps, everyday I have new challenge, every time try to figure out the problems and solve them. Today I facing an amazing problem which is when I write this code in Html page in Django framework:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
my project work clear without any problem (exactly I work on Collapse Button dropdown one) when I use this scripts with URL links and using internet, my dropdown Button work normal but when I use
<script src="{% static 'js/jquery.min.js' %}"></script>
or
<script type="text/javascript" src="{% static 'js/jquery.min.js' %}"</script>
My dropdown button never working, even the terminal didn't give an error.
Why this problem, and how to solve it?
Note: I worked on both browsers : chrome and Edge microsoft, in chrome work perfect, only in Edge, the dropdown button didn't work.
There may be an issue with how your Django app is configured. Please walk through the following Django documentation and confirm that all required steps are completed in order to successfully serve static files from your Django app.
Documentation: https://docs.djangoproject.com/en/3.2/howto/static-files/.
Also, please note that you will need to include the following tag in your template:
{% load static %}
The above tag must be included before the below tag within your template in order for it to work:
<script src="{% static 'js/jquery.min.js' %}"></script>