Semantic UI dropdown change handler

后端 未结 3 1475
野的像风
野的像风 2020-12-23 18:19

I have the following dropdown using Semantic UI:


      
3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-23 19:16

    Actually, there are three ways to bind the event:

    // globally inherited on init
    $.fn.dropdown.onChange = function(){...};
    
    // during init
    $('.myDropdown').dropdown({
     onChange: function() {...}
    });
    
    // after init
    $('.myDropdown').dropdown('setting', 'onChange', function(){...});
    

提交回复
热议问题