qwikad.com
03-23-2013, 05:30 AM
I have this option where after previewing an image, you can close it by clicking on the large image ( see an example here: http://qwikad.com/0/posts/6-services/ ). It works in all browsers except Opera. After a click, the large image is still visible, but if you begin to scroll, it disappears. Is there a way to fix it?
<script type="text/javascript">
function showImage(imgName) {
document.getElementById('largeImg').src = imgName;
showLargeImagePanel();
unselectAll();
}
function showLargeImagePanel() {
document.getElementById('largeImgPanel').style.visibility = 'visible';
}
function unselectAll() {
if(document.selection) document.selection.empty();
if(window.getSelection) window.getSelection().removeAllRanges();
}
function hideMe(obj) {
obj.style.visibility = 'hidden';
}
</script>
The onClick code goes like this:
onClick="hideMe(this);"
<script type="text/javascript">
function showImage(imgName) {
document.getElementById('largeImg').src = imgName;
showLargeImagePanel();
unselectAll();
}
function showLargeImagePanel() {
document.getElementById('largeImgPanel').style.visibility = 'visible';
}
function unselectAll() {
if(document.selection) document.selection.empty();
if(window.getSelection) window.getSelection().removeAllRanges();
}
function hideMe(obj) {
obj.style.visibility = 'hidden';
}
</script>
The onClick code goes like this:
onClick="hideMe(this);"