javascript - How to find out what event is firing on what element -
is there tool (or in firebug) tell me events fired , more importantly on elements bound to?
i have number of javascript "includes", minified, not. experiencing odd behaviour want turn off, cannot find causing it.
i have form showing in "popup" , when seek click on 1 of input boxes, "popup" closes, event bind somewhere causing this.
the problem is, don't know element has spurious event bound it. problem occurs if click anywhere within popup (and on background mask covering rest of page, that's acceptable)
i using firefox, can type in console option. eventys in multiple javascript files done in various ways, through jquery, using inline attributes (eg. onclick="..."), using javascript.
i don't want go , add together line of code every possible event in every javascript file.
i have spent on hr trying hunt downwards dom element , have eliminated obvious ones divs containing popup , body tag.
dom modifications can tracked downwards using break on mutate option within firebug. can activated clicking related button ( ) within html panel. note script panel has enabled work.
there several other break on ... features, may help finding right position within code specific event.
furthermore firebug 2.0 introduced events side panel, displays events bound element selected within html panel. if libraries jquery used, allow investigate user-defined function wrapped library function in case enable alternative show wrapped listeners described in the reply related question.
javascript jquery firefox firebug
No comments:
Post a Comment