javascript - change visibility with onmouseover / onmouseout -


i'm trying make img disappear onmouseover event , img reappear onmouseout event here's have far:

<body>     <h1>catch easter bunny egg!</h1>     <img src="images/rabbit.png" id="rabbit1" onmouseover=""          onmouseout="show(this);" alt="catch rabbit"/>     <img src="images/rabbit.png" id="rabbit2" onmouseover="hide(this);"          onmouseout="show(this);" alt="catch rabbit"/>     <img src="images/rabbit.png" id="rabbit3" onmouseover="hide(this)" alt="catch rabbit"/>     <img src="images/rabbit.png" id="rabbit4" onmouseover="hide(this)" alt="catch rabbit"/>     <h2 id="noeggs">no easter eggs you</h2>     <h2 id="yousuck">humans suck!!!</h2> </body>  var count = 0;  function hide(node) {     count += 1;     node.style.visibility = 'hidden'; }  function show(node) {     node.style.visibility = 'visible'; } 

try using opacity

node.style.opacity=0; 

or

node.style.display='none'; 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -