My website utilizes a Bootstrap layout consisting of a container, rows, and multiple "block-divs," each containing three separate divs. The number of block-divs is generated dynamically by a script based on user input.
The issue I am facing is that when a user clicks on a div, an active class is added to it. However, my current code only allows for one active class to be set for the entire page rather than individual blocks.
I am seeking a solution to assign an active class to each block without relying on any JavaScript frameworks, using pure JavaScript instead.
Here is an example of my layout: https://jsfiddle.net/9vr92ss4/
<!-- JavaScript code here -->
<!-- CSS code here -->
<!-- HTML code here -->