I am new in Django and Python. During working, I am trying to fix the problem all day long but failed. Everything seems okay and working on w3schools and others testing sites also. Here is the two line code from index.js-
alert(window.innerWidth);
document.getElementById("body2").style.color = "#0000ff";
first line shows the window's width but the second line doesn't do anything. I have tried to change color, font-size, weight...etc but nothing works where everything works fine on inline, internal or external css. Only problem on styling from JS. Here, Head section of base.html
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<title>CSP: Home</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<link rel="shortcut icon" type="image/png" href="{% static 'favicon.png' %}">
<link rel="stylesheet" type="text/css" href="{% static 'base.css' %}">
{% block ecss %}
{% endblock %}
</head>
I have linked index.js and index.css through ecss block....