1

I am debugging this code. I would like to know how to see which handler is attached to img.

img.unbind('error').bind('error', function() {
    img.unbind('error').attr('src', 'img/cover-empty.png');
});

I would like print the result using console.log()

4

2 に答える 2

1

imgのIDまたはクラスについて言及していないため

 $.each($("<img selector>").data("events"), function(e, event) {
   $.each(event, function(a, obj) {
    console.log(obj.handler);
 });
});

ワーキングデモ

于 2013-05-30T09:23:45.367 に答える