I need a way to determine if a returned object is a textarea (for example).
Try with:
$('selector').is('textarea');
Or:
alert($('selector')[0].type);