SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    May 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Need help with hints on my web site

    Dear Members, Good day!

    I want someone to help me with the following problem.
    I have a web site, and i want some king of hints to showup on particular words on the paragraph. If i move the curser on a word, i would like a well designed hint to give a definition of the particular word.

    I don't mind if i can hard code this, coz the website is small.

    Thanx in advance.

  2. #2
    SitePoint Zealot milenko1054's Avatar
    Join Date
    Jan 2004
    Location
    Ohio
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A typical way to do this is to attach an onmouseover event to a span that wraps the word and cause a div containing the help text to appear at some offset from the span then disappear onmouseout. You can also make the text a link and use onhover but that's not as semantically accurate.

    As for the text you can either hard code it into the javascript on your page or make it dynamic using some ajax and a scripting language to index a database or file with the text in the span.


  3. #3
    SitePoint Member
    Join Date
    May 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy

    Thanx for the response, can you maybe give an overview or sample of a code to achieve this, coz im so new to this field.

    Thanx again.

  4. #4
    SitePoint Zealot milenko1054's Avatar
    Join Date
    Jan 2004
    Location
    Ohio
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure - just do a search for javascript tooltip and you'll find a bunch of implementations and sample code.


  5. #5
    SitePoint Member
    Join Date
    May 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx man for the help.
    I go quite a lot of them.


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
  •