Does the JavaScript onclick event not work on <select>

后端 未结 4 1879
青春惊慌失措
青春惊慌失措 2020-12-20 06:11

For some reason the code below it is not working correctly. Unless I\'m being quite stupid with my JavaScript I can\'t see what\'s going wrong besides the onclick events not

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-20 07:05

    just add these function to your code:

    $('#drop_down').on('change', function(){
        ($(this).val() == 'other') ? showOther() : hideOther();
    });
    

    se here: http://jsfiddle.net/gLML3/7/

提交回复
热议问题