I have a drop-down-menu with a list from my C# model. Now I want to change a value based on what I choose from the menu.
$(document).ready(function() {
$("#Bereich").val('@Model.Bereich').change('click', function() {
$("select option:selected").each(function() {
if ($(this) == "Something") {
$('#kst').val(123);
}
if ($(this) == "Somethingelse") {
$('#kst').val(345);
}
});
}).change();
});
I am quite new to jQuery so I am not sure how to get an element from a list.