I have created a custom drop-down menu using jQuery and CSS and it all works fine.
However, I have one issue that I cannot find a solution for.
Currently, I can select the Options (Option 1, Option 2, etc...) and I can also, de-select them by clicking on my selection.
When an option is selected, I change the drop-down menu background: and its color: and I add a checked icon to it so the user can see that they have selected something...
However, because I allow the users to de-select their options, I need to be able to change the background: and the color: and remove the checked icon IF there are no selections under that particular dropdown.
To explain this better, I have created this working FIDDLE:
https://jsfiddle.net/okmpxkcu/3/
If you click on the drop-down menus, you can select different options and then you can de-select them again.
I need the drop-down menu to go back it's original background color etc if there are no selections made.
Do help me if you understand
$(this).closest('.buildExMain'). You have to think about your lookups contextually, not globally.