How to overwrite jquery event handlers

后端 未结 6 2028
逝去的感伤
逝去的感伤 2020-12-13 01:31

I\'ll try to explain the problem with a simple code.

var fireClick = function() { alert(\'Wuala!!!\') };

$(\'#clickme\').click(fireclick);
$(\'#clickme\').c         


        
6条回答
  •  余生分开走
    2020-12-13 02:14

    I would try to eliminate the extra calls, but short of tyhat you could make sure to call both of these each time:

    $('#clickme').unbind('click', fireclick);
    $('#clickme').click(fireclick);
    

提交回复
热议问题