I am currently working on a personal project where I am attempting to replicate the design shown below:
The most challenging part for me right now is implementing the functionality that when one of the 6 differently colored boxes is clicked, additional information pops up like in the example:
My initial focus is on changing the background color when the Facebook Ad Campaign box is clicked. Upon clicking it, the background color of the entire container (which houses the 6 boxes) should change.
I believe using jQuery is the best approach for this task, but my attempts so far have been unsuccessful as the following code did not work:
$("#fbAdCampaigns").click(function(){
$(#container-parent").backgroundColor = "red";
}
Alternatively, I tried the following code to see if it changes the color of the first of the 6 boxes:
$("#fbAdCampaigns").click(function(){
$("#fbAdCampaigns").css({ "background-color": "#ffe"});
})
Unfortunately, neither of these methods worked as expected since nothing happened. You can view what I have accomplished so far here:
https://codepen.io/JoyFulCoding/pen/EzWyKv
I greatly appreciate any assistance you can provide.