I have this div and and button near the div:
<div id="tempData"></div>
<input type="button" text="status" disabled>
When page load the button is disabled.
At some point I add elements programmatically to div when div not empty it has to be enabld. How can I make button enabled when div not empty and disabled when it empty?
#tempData:empty + input { pointer-events: none; }(although, honestly, it's probably a bad idea).