Results 1 to 4 of 4

Thread: Preview Link Content in Tooltip

  1. #1
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Preview Link Content in Tooltip

    Hello, I am looking for information on how to bring up a tooltip that previews the content of the page of the link your cursor is hoveirng over. For example, on Espn.com, when you hover over one of the news headlines, it shows you the first few sentences of the article it is linked to. Thanks!

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I made a few examples around 1 - 2 weeks ago, although I don't see the tooltip it shows, you can check this out:
    http://nile.richei.net/applets/tooltip/
    If you go to this:
    http://nile.richei.net/applets/tooltip/toolt.js
    You can see all the javascript I used, the first part are arrays, as you can see:
    Code:
    toolt[0] = "The username is needed for your login details. When you login you will want to use this.";
    toolt[1] = "The password is a secure random input that should be kept safe.";
    toolt[2] = "The definition of \"Mutilated\", is broken. \"That toy is mutilated\"";
    toolt[3] = "This is in a really big area. This can be useful for info that you want to provide";
    You can make more, or delete some of these.
    When you want the hover effect to affect. You put this on the link/button:
    Code:
    onMouseMove="showtooltip(x,'tooltip',event)" onMouseOut="hidetooltip('tooltip')"
    I made the highlighted above, thats where you put the number of the array(toolt) you want to display.
    You also need to include this on your page:
    Code:
    <div id="tooltip" class="toolt"></div>
    Hope this Helps,
    Nile
    Jeremy | jfein.net

  3. #3
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply. It looks from your example that the tool tip text comes from what is statically placed into it. Is that correct? I am looking for a tooltip that will grab information from another page (or from a database) based on the information contained in the link (such as an object id). Does this make sense Thanks a lot!

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    You can do this, but you can use my tooltip to start off. You should also use a database and display that data in the js file. I only gave an example, you have to do the rest.
    Jeremy | jfein.net

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
  •