SitePoint Sponsor

User Tag List

Results 1 to 16 of 16
  1. #1
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    OO tooltip script?

    Hey all

    I'm trying to quickly find a license-free, OO tooltip script. It just needs to handle simple and/or captioned tooltips. It should be relatively easy to config and use.

    I'll keep looking myself, but maybe someone here already knows of one.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Check out the "uberTooltip" script here .

  3. #3
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sweet - thanks Vinnie. Just what I was after.

    *Note to self: time to update some of my DHTML components - I'm falling behind!*

    Edit:

    After implementing it, this works great, although it's not the best OO design I've seen, it's pretty good. There are about 8 global functions that just don't need to be global.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  4. #4
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's a simple one I wrote once. Not quite OO, but I'd be glad to make any modifications you need.

  5. #5
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's cool, Mike. I'm actually looking for one that floats with the cursor - and where I can specify it's position to the cursor (left or right).

    Whaddya think?
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  6. #6
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just got back from my son's high school band concert
    That's cool, Mike. I'm actually looking for one that floats with the cursor - and where I can specify it's position to the cursor (left or right).

    Whaddya think?
    Sounds like fun... give me a few minutes

  7. #7
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Before I go any further, see if this one is getting close to what you need.

  8. #8
    SitePoint Enthusiast
    Join Date
    Sep 2003
    Location
    Paris
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Thanks Mike

    Hey Mike I was thinking to thank you for your Javascript API. Now that I came to Sirepoint's forum I take the chance.

    To whoever is watching this thread I really recommend Mike's x and cbe libraries. It makes a javascript beginner looks like an expert

    Bye

    Yvan

  9. #9
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Yvan, welcome to SitePoint Forums!

    and Thanks very much for the very nice comments. I look forward to chatting with you.


  10. #10
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks great. How about one aligned to the right of the cursor? (a fixed-width tooltip is fine)

    And yes, Mike's libraries are great - even for non-novices
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  11. #11
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks beetle

    When you call the addGroup() method, you specify X and Y offsets. The position of the tooltip is offset from the mouse pointer by those offsets. Have a look at the demo again. I changed the offsets as follows...
    Code:
    window.onload = function()
    {
      xTooltips.addGroup('tipGrp1', 'tipGrp1s', 12, 0);
      xTooltips.addGroup('tipGrp2', 'tipGrp2s', 14, -2);
      xTooltips.addGroup('tipGrp3', 'tipGrp3s', 16, -4);
    }
    Is that what you had in mind? You've got a good point. Aligning to the right of the mouse is a good idea, otherwise the native tooltip gets in the way... which brings up a question I have: Is using the TITLE attribute (for the tooltip text) a good idea? Because the browser pops up its own tooltip with the TITLE text also.


  12. #12
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, I think I should provide more info.

    I'm not actually using this as a tooltip, but rather something else (please don't blame me for the pallid-looking site - it's not my design)

    I used to have the "Help" button on the right - therefore needing the "tooltip" to appear to the left of the cursor. This site was using an older version of overlib, and although the newest version is very nice, it's quite large and doesn't suit my style of coding.

    The code on the page now is a slightly modified version of the script Vinnie linked me to (I added a method to allow me to create the captioned look).

    I'm not asking you to make anything, but wanted you to know more specifically what I'm using this for.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  13. #13
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi beetle,

    I did finally update my demo - it's much better now but not exactly what you needed (sorry about that).

    Good luck with the project.

    Duty calls...

  14. #14
    SitePoint Zealot johno's Avatar
    Join Date
    Sep 2003
    Location
    Bratislava, Slovakia
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Annotations support for PHP5
    TC/OPT™ Group Leader

  15. #15
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice work, johno
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  16. #16
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great work, johno!

    I couldn't stop playing with this - so I have one more demo: X Tooltips Demo 3



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
  •