Programmatically fired events not working with event delegation

后端 未结 2 1716
孤城傲影
孤城傲影 2021-02-06 07:22

Would really appreciate if anyone can help me figure out why I am unable to fire events programmatically when using event delegation in MooTools (from the Element.Delegati

2条回答
  •  你的背包
    2021-02-06 08:01

    I resolved it this way:

    document.addEvents({
        'click:relay(.remove_curso)': function(){
            document.fireEvent('_remove_curso', this);
        },
        '_remove_curso':function( me ){
            console.log( me );
        }.bind( this )
    }
    

提交回复
热议问题