How to debug JavaScript / jQuery event bindings with Firebug or similar tools?

前端 未结 15 1131
一个人的身影
一个人的身影 2020-11-22 06:56

I need to debug a web application that uses jQuery to do some fairly complex and messy DOM manipulation. At one point, some of the events that were bound to particular eleme

15条回答
  •  长情又很酷
    2020-11-22 07:32

    As a colleague suggested, console.log > alert:

    var clickEvents = $('#foo').data("events").click;
    jQuery.each(clickEvents, function(key, value) {
        console.log(value);
    })
    

提交回复
热议问题