JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="myInput" /><br />
Messages:<br />
<textarea id="messages"></textarea><br />
Child elements from myInput: <span id="step"></span>
CSS
#messages {
width: 100%;
height: 100px;
}
#step {
text-decoration: underline;
}
JavaScript
/**
* author: @laubstein
* date: Mar 25 2011
* title: jQuery $(':input').text('something') throw error in IE
**/
try {
$('#myInput').text('something');
$('#step').append($('#myInput')[0].childNodes);
} catch(e) {
// if you are using IE, you will see this message
$('#messages').append(e.message + '\n');
$('#step').text('<empty>');
}