I have a page with such structure
<div id=0>
...
<textarea id=sometext></textarea>
...
<button class="coolbutton"></button>
...
...
</div>
<div id=1>
...
<textarea id=sometext></textarea>
...
<button class="coolbutton"></button>
...
...
</div>
<div id=2>
...
<textarea id=sometext></textarea>
...
<button class="coolbutton"></button>
...
...
</div>
I need to hide button only in the first div (id=0) when textarea in this div is empty. Please notice that only div ids differs. Ids of textareas are same. Buttons in other divs don't need to be hidden.
Please provide solution using js or asp.net mvc tools. Ask me if anything is unclear.