JSFiddle - React, Tailwind, and code Playground
by Avinash_R
HTML
<div id="selectedDefinitionsDiv">
<div id="selectedDef1" class="myclass">
<textarea class="textClass" style="margin-left:5px;width:600px;height:80px;">an adoptive country</textarea>
<input type="button" onclick="removeSelectedDefinition(1)" value="Delete">
</div>
<div id="selectedDef2" class="myclass">
<textarea class="textClass" style="margin-left:5px;width:600px;height:80px;">my adopted state</textarea>
<input type="button" onclick="removeSelectedDefinition(2)" value="Delete">
</div>
</div>
JavaScript
$('#selectedDefinitionsDiv').children('.myclass').each(function(i) {
var val = $(this).children('.textClass').val();
console.log( val );
});