Change value of materialize select box by jquery

前端 未结 11 1553
滥情空心
滥情空心 2020-12-29 22:18

I want to change materialize select box value by jquery.

I am using $(\'#myselect\').val(\'1\'); on onchange event of other select box but

11条回答
  •  情歌与酒
    2020-12-29 22:41

    Using delegated event fixes the problem for me.

    HTML

     

    JS

    $('#pickerContainer').on('change', 'select', function(){
     console.log("got you");
    });
    

提交回复
热议问题