Skip to content

Motionbox EventHandler Focus and Blur Bubbling Update

by Topper on October 31st, 2008

The Motionbox EventHandler ( http://github.com/tobowers/motionbox-eventhandler/tree/master ) now supports focus and blur bubbling. Based on this technique. Internet Explorer is supported too (behind the scenes it uses focusin and focusout, but you don’t need to know that).

[html]



[/html]

[js]
// This now works:
MBX.EventHandler.subscribe(“.input_field”, “blur”, function (evt) { //do sometthing });

// Delegation on the form also works
MBX.EventHandler.subscribe(“#formy”, “focus”, function (evt) { //do something });
[/js]