This week's book giveaway is in the
We're giving away four copies of
and have Sam Newman on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Problem with custom events in jQuery
Joined: Dec 07, 2010
Mar 15, 2011 10:57:01
I created the following
app to debug some jQuery code I am developing. When I click on the button, I get the first debug message ("ever here"), but not the second ("foo"). I can't figure out what I am doing wrong here. Please advise.
Joined: Nov 08, 2001
Mar 15, 2011 11:59:38
You are triggering the event on an element that is not listening for it.
Author and ninkuma
Joined: Jan 10, 2002
Mar 16, 2011 00:40:57
Remember that events, even custom events, bubble up the DOM tree. So you must trigger events on the listening element or one of its descendants.
Asking smart questions
Books by Bear
Have you checked out
subject: Problem with custom events in jQuery
stopping event propagation best practice (jQuery)
jQuery question- jQuery attribute in IE?
jQuery.getJSON callback not executing
Not able to hide a sentence using jquery
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015