var example_name = document.getElementById("example_nameID"); example_name.addEventListener('mouseover',function(){ example_name.display="block"; }) example_name.addEventListener('mouseleave',function(){ example_name.display="none"; })