javascript - Div Flickering onmouseover, onmouseout -


i have image , want div on when mouse on don't want onmouseout. wrote code , works it's flickering. here code:

<div id="div" style="opacity:0.6; background-color:#2c3e50; width:136px; height:163px; z-index:199; position:absolute; vertical-align:top; font-size:120px; text-align:center; color:white; display:none;">1</div> <img alt="ברק לוי" src="" style="background-color:red; height:163px; width:136px" onmouseover="picture(true)" onmouseout="picture(false)"/> 

function picture(bool) {     if (bool) {         document.getelementbyid("div").style.display = "block";     }     else if (bool==false) {         document.getelementbyid("div").style.display = "none";     } } 

jsbin how can solve it?

because need use onmouseout event on div

<div id="div" style="opacity:0.6; background-color:#2c3e50; width:136px; height:163px; z-index:199; position:absolute; vertical-align:top; font-size:120px; text-align:center; color:white; display:none;" onmouseout="picture(false)">1</div>  <img alt="ברק לוי" src="" style="background-color:red; height:163px; width:136px" onmouseover="picture(true)"/> 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -