JavaScript without if else cascades

javascript

Never ending JavaScript. Is this a rehash of an old post? Yes it is.
But is it still relevant.? Well, yes it is. Very much so.

Please (re) read carefully and try and use in your production JavaScript.  In case you want it to be resilient and efficient JavaScript.

[first published 2011 Sep 15]

Continue reading “JavaScript without if else cascades”

List of events attached. The jQuery plugin.

Do you think they have noticed we are not on the list for this event?
Do you think they have noticed we are not on the list for this event?

[Update 2015 June 07]

In case you need the code, or you just want a try, or if you doubt the solution bellow still works, please go to THIS JS fiddle.

[Originally published April 9, 2013]

For each element  DOM itself has a list of events, associated with that element. Currently that list is not exposed. There is no DOM in-built method to list events attached to an element.

Some people have this irresistible urge to get to this list. Perhaps we can help them. Using jQuery there is a way to get to the list of jQuery events attached to each DOM element.
Continue reading “List of events attached. The jQuery plugin.”