1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <html> <body> <div id="Layer" style="display: none; position: absolute; z-index: 1;"> </div> <span onmousemove="showPic('http://i.imgur.com/cWah9H5.jpg')" onmouseout="hidePic()">hooooooootdog</span> <p> <span onmousemove="showPic('http://i.imgur.com/h7crwsy.jpg')" onmouseout="hidePic()">akagi bowl</span> <p> <span onmousemove="showPic('http://i.imgur.com/KAAYNgJ.jpg')" onmouseout="hidePic()">let's go</span> <p> </body> <script> function hidePic(){ document.getElementById("Layer").innerHTML = ""; document.getElementById("Layer").style.display = "none"; } function showPic(s){ var x,y; x = event.clientX; y = event.clientY; document.getElementById("Layer").style.left = x; document.getElementById("Layer").style.top = y; document.getElementById("Layer").innerHTML = "<img src=\""+s+"\">"; document.getElementById("Layer").style.display = "block"; } </script> </html> |
Direct link: https://paste.plurk.com/show/1867067