Still show div when textarea/input onblur / loses focus
so I try to hide/show a div element with using onfocus and onblur:
<textarea
onfocus="document.getElementById('divID1').style.display='block';"
onblur="document.getElementById('divID1').style.display='none';"></textarea>
<div id="divID1">
This works fine, but the problem is that the div hides again when the
textarea/input doesn't have focus anymore.
This is the whole code: JSFIDDLE link.
You can see that you can't check the Checkbox or select text.
What can I do to still display the div element when the textarea lost
focus or to make the textarea still having focus when I clicked on the
div?
Sorry, but I'm new to Javascript.
Thanks in advance,
Philipp
No comments:
Post a Comment