How to toggle content in Semantic UI buttons?

前端 未结 4 1333
春和景丽
春和景丽 2021-02-05 06:00

The documentation says a button can be formatted to toggle on or off, but the example given is merely

Vote &
4条回答
  •  我在风中等你
    2021-02-05 06:11

    It is very simple,

    
    

    just use the classic jquery click to toogle the active class, and add any other changes you need. I think that using semantic stage is a waste of time in this case.

    $('#tgl').click(function(){      
                $(this).toggleClass('active');
    });
    

提交回复
热议问题