JQuery code in dash

I want the option label of a dcc.Dropdown to have red color when it contains ‘foo’.
It’s span-tag is called ‘Select-value-label’. CSS alone won’t help me with looking into the span's text so I need to use jQuery. This is how far I got:


from dash import Dash, dcc, html

app = Dash(__name__)

app.layout = html.Div([
    dcc.Dropdown(options=[{'value': 'foo', 'label': 'foo'}, 
                          {'value': 'bar', 'label': 'bar'}]),
    html.Script(src='./script.js', type='text / javascript')

if __name__ == '__main__':

$ Select-value-label:contains('foo').css( "color", "red !important" );