javascript - link or button mouseover pop-upbox/image location change -
i have text box(link) linked mouseover popup image popup appears right @ mouseover location. need changed specific location. how change location of popup appears? here have far:
html:
<a href="" onmouseover="showimage('http://ultimatefinishdetailing.com/images/vancombination4.jpg')" onmouseout="hideimage()">ultimate finish auto detailing</a> <img id="popupimage" src="" alt="popup image" style="display: none"/>
javascript:
<script type="text/javascript"> function showimage(src) { var img = document.getelementbyid('popupimage'); img.src = src; img.style.display = "block"; } function hideimage() { document.getelementbyid('popupimage').style.display = "none"; } </script>
wrap image in div
<div class="pop-up"> <img id="popupimage" src="" alt="popup image" style="display: none"/> </div>
the apply css div per needs
.pop-up { height : 100px; width : 100px; top : 30px; left : 25px; float : right; }
Comments
Post a Comment