I'm using the same editor as Stack Overflow and the HTML looks something like this with multiple editors on a page:
<pagedown-admin id="modal-data-solution-1">
<div>
<div>
Menu
</div>
</div>
<textarea>
ABC
</textarea>
</pagedown-admin>
<pagedown-admin id="modal-data-solution-2">
<div>
<div>
Menu
</div>
</div>
<textarea>
ABC
</textarea>
</pagedown-admin>
Is there a way that I could hide the <div>
that contains the menu and have it show only when the <textarea>
has focus. Note that I'm not using jQuery so it would need to be a vanilla JavaScript solution. I'm just not sure where to start trying to code something like that.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…