Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

input:focus show hide div

var input = document.getElementById('myinput');
var message = document.getElementsByClassName('newone')[0];
input.addEventListener('focus', function() {
    message.style.display = 'block';
});
input.addEventListener('focusout', function() {
    message.style.display = 'none';
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #show #hide #div
ADD COMMENT
Topic
Name
1+2 =