Duplicate one element's event handlers onto another?

前端 未结 6 1551
半阙折子戏
半阙折子戏 2021-02-14 01:51

How do you copy an event handler from one element to another? For example:

$(\'#firstEl\')
    .click(function() {
        alert(\"Handled!\");
         


        
6条回答
提交回复
热议问题