I am currently implementing the Select2 Input CSS/jQuery framework from to assist me in handling multi-select boxes. However, I am facing difficulty in changing the background color of the results when the select box is clicked.
To provide a better understanding, I have prepared a JS fiddle:
https://jsfiddle.net/L26bzgmf/
This is the specific select box I am working on:
<select class="form-control select2-multi" name="tags" multiple="multiple">
<option value="1">Tag 1</option>
<option value="2">Tag 2</option>
<option value="3">Tag 3</option>
<option value="4">Tag 4</option>
</select>
When the box is clicked, I require all four tags to be displayed in white text with a background color of #333333. Subsequently, upon selection (as evidenced by the automatically selected Tag 1), I need the background color to transition to #666666, the font to remain white, and the "remove" x icon to also turn white with a hover effect of #aa0000.
I've experimented with both jQuery and CSS to achieve this outcome but so far, I haven't had any success. It's quite frustrating as their documentation was previously helpful, but now it seems perplexing. I am open to exploring alternative solutions that offer similar functionalities as Select2 for my tagging system within the blog.
This feature is being developed for implementing a "tags" system on my blog.