Q:

How to detect input types when binding event to parent

I am trying to bind an event to a parent instead of each child.
I can successfully test for SELECT, TEXTAREA and A. How to I test for input[type='text']?
$('form').bind('focusin', function(e) {
    var target = e.target, // e.target grabs the node that triggered the event.
        $target = $(target);  // wraps the node in a jQuery object
    if (target.nodeName === 'SELECT' | target.nodeName === 'TEXTAREA' | target.nodeName === 'A') {
        alert('hi');
        // do stuff
    }
});

A:

Note: from jQuery 1.7, use on() instead of delegate()

Using delegate() sounds the easiest and most fitting to me.
$('form').delegate('textarea, select, a, input[type="text"]', 'focusin', function () {
  alert('hu');
  //do stuff
});

Actually it does just what you asked for. The event itself is attached to form and checks whether the target matches the selector given.
Live Demo
No need to reinvent the wheel.

