Populating drop down with json object

前端 未结 3 1690
一个人的身影
一个人的身影 2020-12-05 15:36

I have managed to populate my drop down menu with a json object, which worked fine. Currently I am trying to display an image which is in a hidden div based on an option se

3条回答
  •  北海茫月
    2020-12-05 16:23

    $('#dropDownDest').on('change', function() {
        if ($(this).val() == 'vol123r') {
            $('#imghide').removeClass('hide');
        } else {
            $('#imghide').addClass('hide');
        }
    });
    

    FIDDLE DEMO

提交回复
热议问题