wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Event not being triggered Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Event not being triggered" Watch "Event not being triggered" New topic
Author

Event not being triggered

Rob Dennett
Ranch Hand

Joined: Dec 07, 2010
Posts: 79
I have an event binding defined thus:



And I am triggering it with this:



The the code that triggers the event is definitely being executed as evidenced in the Chrome debugger and $(document).data('events')['foo'] contains the binding when the event is triggered, yet when I put a breakpoint in the handler, it doesn't trip. What gives?

Thanks,
Rob
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Working fine for me: http://jsfiddle.net/pnPxN/

Can you make an example where it is not working?

Eric
Rob Dennett
Ranch Hand

Joined: Dec 07, 2010
Posts: 79
I found the problem. Another snippet of code was unbinding the event and rebinding it to a different function. I didn't notice this because the Chrome debugger doesn't show the guts of the function. Is there a way to see that in Chrome?

Thanks,
Rob
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Event not being triggered
 
Similar Threads
Submit dynamically created form using jQuery Form plugin
Triggering jQuery events without knowing the selector to trigger?
jQuery form submit using Form plugin not working
what does "this" refer to
Static File Download Dialog Box : JSP