Results 1 to 2 of 2

Thread: Too many tooltips = long page load time!

  1. #1
    Join Date
    Oct 2010
    Birmingham, Alabama
    Thanked 0 Times in 0 Posts

    Question Too many tooltips = long page load time!

    1) Script Title: Image w/ description tooltip v2.0

    2) Script URL (on DD):

    3) Describe problem: I LOVE THIS SCRIPT! That said, even though it works perfectly, I have a problem due to the nature of my page.

    I am testing this script on a beta page that has over 1,100 links, so the script generates over 1,100 tooltips. Just like it's supposed to.

    But because each tooltip displays an image that's 6KB-9KB in size, the page takes a LOOONG time to load (about 50 seconds for me).

    So MY QUESTION IS... Is there a way to prevent the thumbnail images from downloading until the visitor mouses over the link? And thus download one thumbnail at a time...? Or is this not the right way to approach my desired solution of displaying a thumbnail on mouseover?

    P.S. If you visit this page, not all the tooltips work, because the beta site does not include the most recent images published to the production site. But enough of the images are present so you get an idea of the time involved in the page download!

    Thank you,

    Steve Adams
    Webmaster, the Radio Attic

  2. #2
    Join Date
    Aug 2004
    Thanked 1,008 Times in 993 Posts
    Blog Entries


    Try the below modified .js file, which only populates each tooltip with the specified image the first time you move the mouse over the corresponding anchor, instead of automatically when the page loads. Before you try out the .js file though, you may want to copy the tooltip array from your original .js file, and replace the one in the modified file with it so you don' have to redefine all of your tooltip contents again, for example:
    		tooltips[0]=["red_balloon.gif", "Here is a red balloon<br /> on a white background", {background:"#FFFFFF", color:"black", border:"5px ridge darkblue"}]
    		tooltips[1]=["duck2.gif", "Here is a duck on a light blue background.", {background:"#DDECFF", width:"200px"}]
    		tooltips[3]=["bridge.gif", "Bridge to somewhere.", {background:"white", font:"bold 12px Arial"}]
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    radioattic (02-28-2011)


Posting Permissions

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