as the title says, I keep getting \"undefined\" when I try to get the id attribute of an element, basically what I want to do is replace an element with an input box when th
Remove the inline event handler and do it completly unobtrusive, like
inline event handler
$('#race').bind('change', function(){ var $this = $(this), id = $this[0].id; if(/^other$/.test($(this).val())){ $this.replaceWith($('', { type: 'text', name: id, id: id })); } });