Setting the context for a search
I have set up a query like:
$('.formFieldContainer', formElement).each(function(index) {
var element = $([id^='gofr_']. <???>).html()
console.log(element);
});
But I am not sure what to put in the <???>. The id's will be unique but will differ based on which container they are in. For example:
<div class="formFieldContainer">
<input id="gofr_1"/>
</div>
<div class="formFieldContainer">
<input id="gofr_2"/>
</div>
So the idea is to get the index of the formFieldContainer and then search for elements in the container.To do this I think I need to issue a query and specify the context. Hence the question of what I should put for <???>.
Ideas?
Thank you