Motionbox EventHandler Focus and Blur Bubbling Update

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:
<form id="formy" action="#">
  <input id="inputy1" name="inputy1" class="input_field" />
  <input id="inputy2" name="inputy2" class="input_field" />
</form>

JavaScript:
// 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 });

The Buzz {1 trackbacks/pingbacks}

  1. Pingback: Getting blur, focus and change (in ie) events to bubble using the Motionbox Event Handler at Topper’s Blog on November 3, 2008

Speak Your Peace

  • Comment Policy:Could go here if there's a nagging need Login Instructions: Would go here if there's a desire.