Among these options in rectangles, each with a class of ('.caja'), the styling and database values are stored within this class for user selection.
However, I am facing an issue where jQuery and CSS automatically close all div elements when the user dismisses any option. I have attempted using the main class element ('.caja') but it resulted in closing all divs altogether.
Another approach I tried was assigning numerical names to individual rectangles, but this led to repetitive code which is not ideal.
<div class="d-inline-flex flex-wrap row justify-content-center">
<div class="caja caja-1" style="background-color: white;">
<label class="caja-label">Administración de empresas</label>
<label class="container-caja">
<input type="checkbox" id="myCheck" onclick="myFunction()">
<span class="checkmark"></span>
</label>
<button type="button" class="btn-cerrar"> X </button>
</div>
<!-- Other similar div elements follow -->
I am seeking a solution that allows me to close only one specific div per click on the close button, instead of closing all div elements at once. Any guidance or suggestions would be highly appreciated.