JS function "cooperating" with option in <select> tag does not cooperate

I have a problem with displaying a div (class = “typ-skoda”) after choosing one of the options (value = “Skoda”) included in select tag (id = “znacka”). Could you please help me? Thank you!

In CSS file is class “typ-skoda” defined with settings – display: none;

JS:

    

    $("#znacka").change(function() {

        if ($("#znacka").val() == "Skoda") {

            $('.typ-skoda').css("display", "inline-flex");

        }       

        else {

            $('.typ-skoda').css("display", "none");

        }

    });


HTML:

<select id="znacka">

<option value="hide">Značka vozu</option>
<option value="Skoda" id="Skoda">Škoda</option>
<option value="Alfa-Romeo" id="Alfa-Romeo">Alfa Romeo</option>

</select>

"> Typ vozu Fabia Felicia


Source: stackoverflow-javascript