Results 1 to 6 of 6

Thread: Fixed Tooltip (new)

  1. #1
    Join Date
    Jan 2005
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Fixed Tooltip (new)

    Fixed Tooltip Script

    As always, sterling work, but (!), what if you wanted the tooltip to remain in place for longer than the default i.e., to put a link inside? Either it could hang in place using a larger number of miliseconds, or it hangs for as long as a mouse hovers on it...

    Is there a maximum # of miliseconds you can use before things get silly?

    Additionaly, is there a way to include links inside the onMouseover tag? The quotation marks for hyperlinks seem to break the code.

    Thanks...

  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

    Quote Originally Posted by ChasDevlin
    Is there a maximum # of miliseconds you can use before things get silly?
    That's a matter of personal taste.
    Quote Originally Posted by ChasDevlin
    Additionaly, is there a way to include links inside the onMouseover tag? The quotation marks for hyperlinks seem to break the code.
    Try:
    Code:
    onMouseover="fixedtooltip('Comprehensive JavaScript <a href=\'http://www.javascriptkit.com/\'>tutorials</a> and over 400+ <b>free</b> scripts.', this, event, '150px')"
    - John
    ________________________

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

  3. #3
    Join Date
    Jan 2005
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    John,

    Thanks for the fast reply... the links inside work great. I upped the milliseconds to 5000 (5 seconds?). Is there a maximum on that?

    Could the script not be modified so the tooltip remains in place for as long as a mouse hovers on it (I guess elminating the var disappeardelay)?

    This is quite productive for a Monday

  4. #4
    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

    A better idea would be changing this in the script:
    Code:
    if (ie4||ns6)
    document.write('<div id="fixedtipdiv" style="visibility:hidden;width:'+tipwidth+';background-color:'+tipbgcolor+'" ></div>')
    to this:
    Code:
    if (ie4||ns6)
    document.write('<div id="fixedtipdiv" onmouseover="clearhidetip()" onmouseout="delayhidetip()" style="visibility:hidden;width:'+tipwidth+';background-color:'+tipbgcolor+'" ></div>')
    With this scheme disappeardelay could be as little as 250.
    Last edited by jscheuer1; 06-06-2005 at 06:57 PM.
    - John
    ________________________

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

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I think it's important to note that this is a tooltip script, meant to only provide a description of the link it's associated with, and not to carry other content like links. Based on this definition, the tooltip was designed to disappear once the user moves the mouse out of the link.

    If you want the tooltip to carry content like links and not to disappear until the user actually moves the mouse out of the tooltip, consider using a drop down menu like AnyLink CSS Menu instead: http://www.dynamicdrive.com/dynamici...anylinkcss.htm

  6. #6
    Join Date
    Jan 2005
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    True... I was probably getting ahead of myself. I'd forgotten about the anylink dropdown but will certainly give it a try (which seems kinda obvious now)!

    Thanks,

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
  •