SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2004
    Location
    Belgium
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    image tooltip flickers

    Hi all,
    I have made some kind of tooltip so that when hovering over an image, a larger image is displayed on top of that. It works all fine if I show that large image somewhere in the screen where my mousepointer is not present. However, in my final version that would not be possible as the image (as I said) must be on top of another one which I'm "onmouseover"-ing.

    When my mousepointer is over the big image, it starts to flicker in firefox, while in IE it disappears totally.
    Could someone help me out here please?

    Code:
    function showFullImage(thumbnail, imgurl) {
    	var div = document.getElementById('dbimgpopup');
    	if (div.style.visibility == 'hidden') {
    		var x = findPosX(thumbnail)  + 100; // + 200 - 350;
    		var y = findPosY(thumbnail);
    		div.style.left = x + 'px';
    		div.style.top = y + 'px';
    		div.innerHTML = '<img src="' + imgurl + '"/>';
    		div.style.visibility = 'visible';
    	}
    	return false;
    }
    
    function hideFullImage() {
    	var div = document.getElementById('dbimgpopup');
    	div.innerHTML = '';
    	div.style.visibility = 'hidden';
    	
    	return false;
    }
    That element div it finds is a <div> with z-index:10, position:absolute, visibility: hidden.

    Thank you

  2. #2
    SitePoint Zealot
    Join Date
    Jun 2004
    Location
    Belgium
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, for the record, I solved it by adding the onmouseover="hideFullImage()" to the popupdiv instead of having it on the small image.

    The flickering happened because when the popup appeared, the onmouseout was fired, then no more popup, so again onmouseover ... and flicker galore

    Hope anyone has help to this


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •