Results 1 to 3 of 3

Thread: Cool DHTML Tooltip - Need help with text format

  1. #1
    Join Date
    Feb 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Cool DHTML Tooltip - Need help with text format

    HTML Code:
    Sorry, I realize that this is probably a very newb question
    but is there any way to format the text that you want to appear in the tooltip?
    
    For example, I would like the tooltip to read somewhat like this:
    
    Welcome to my tooltip
         1. It's useful
         2. It's informative
         3. Everybody likes it!
    
    Any suggestions would be greatly appreciated.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    See this thread.

    Also, after that, have a look at this:

    Code:
    (snip) . . .
    }
    }
    
    document.onmousemove=positiontip
    
    //added defined tips:
    var tipOne='<ul style="margin-bottom:0;margin-top:0;"><li>Art Directory Twenty One</li><li>About</li><li>Contact Us</li></ul>'
    
    var tipTwo='<pre style="margin:0;font-family:verdana, arial, sans serif;font-size:14px;">Welcome to my tooltip\n\
         1. It\'s useful\n\
         2. It\'s informative\n\
         3. Everybody likes it!</pre>'
    </script>
    
    <a href="http://www.yahoo.com" onMouseover="ddrivetip('Visit Yahoo.com')";
     onMouseout="hideddrivetip()">Search Engine</a>
    
    <br><span style="cursor:default;" onMouseover="ddrivetip(tipOne, '#EFEFEF', 225)";
     onMouseout="hideddrivetip()">Planned Items</span><br>
    
    <a href="http://yahoo.com" onMouseover="ddrivetip(tipTwo, 'yellow', 200)";
     onMouseout="hideddrivetip()">Yahoo</a>
    
    </body>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your help, John!

    The code worked great with a few easy modifications. I'm using the tooltip whenever a user mouses over an entire cell on a table.

    It was definitely a "d'oh" moment when I saw your code. Thanks again!

    Sandi

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
  •