Seeking assistance with creating a board using JavaScript and jQuery. The goal is for the user to select a cell (which adds an active class), then click on a different cell filled with a specific color, causing the original cell to fill in with the same color. Here is the relevant code:
var fillIn = $('.active_color_select')
$(red).click(function(){
$(fillIn).css('background-color', 'red');
});
** Suspecting an issue in this section
Upon testing, it was observed that after clicking an empty cell and selecting a color, the cell fills in correctly. However, choosing the next color results in all cells changing to the same color. Guidance is needed to ensure that only the selected cell receives the desired color without affecting other cells upon selection of a new color.
Your valuable input would be highly appreciated!
Thank you