I have created a dropdown menu that is intended to change the border style of a div element. The dropdown uses select and option HTML tags. However, when I trigger the .change() event, the border style does not update to the selected value. Can someone please point out what I am doing wrong? You can view the code on this JSFiddle link.
Below is the JavaScript code:
$(function() {
$("select").change(function() {
var getChoice = $("select option:selected").val();
$('.active').css('borderStyle', getChoice);
});
});