script which display a hint when you move mouse above some element

Discussion in 'Javascript' started by Pawel_Iks, Apr 9, 2008.

  1. Pawel_Iks

    Pawel_Iks Guest

    Hello, I need help with some script. Let's assume that I have a html
    paragraph containing tags a:

    <p>
    .... ble ble <a id='link1' href='#'>link1</a> ...
    <a ...> </a>...
    </p>

    and I want to write the script which will be displaying the div (I
    don't know wheater this div element should exist staticaly or it
    should be created dynamicly by onMouseOver event) and the left upper
    corner of this div will be displayed in the point when I move the
    mouse on the element <a>. I also expect that this script will be
    showing different information acording to the id filed for the a tags
    (for example div with content 'you move above a with id: link1')
     
    Pawel_Iks, Apr 9, 2008
    #1
    1. Advertisements

  2. Pawel_Iks

    SAM Guest

    Pawel_Iks a écrit :

    css :
    =====
    a { position: relative }
    a span { display none; position: absolute; border: 1px solid;
    background:#ffc; top: 0; left: 0; text-decoration: none}
    a:hover span { display: block; z-index: 99; }

    HTML:
    =====
    <a href="#" id="link1">link 1
    <span>You move above a 'A' with id = 'link1'</span></a>
     
    SAM, Apr 9, 2008
    #2
    1. Advertisements

  3. Pawel_Iks

    Tom de Neef Guest

    There is a nice javascript for mouseovers called boxover.js. See what
    happens when you move over the elements in www.qolor.nl/spelling/ww.htm (It
    stops when you click "Volgende opg." - which is the normal thing to do on
    this page. It is for training Dutch conjugations, but that's irrellevant
    here.) The title and text of the tooltips are placed in the html elements as
    follows: <tag title="header=[ ..your header text...] body=[ ... your body
    text, which may contain html elements ...]"> ... </tag>.
    If you can't find a download site for boxover, take the script from above
    link at /data/wwBoxover.js.

    Tom
     
    Tom de Neef, Apr 9, 2008
    #3
  4. Pawel_Iks

    Pawel_Iks Guest

    thx Tom, I were looking exactly the same thing as you show me by this
    link, but I'm interesting not in using such script written by someone
    else but to write similar script :)
     
    Pawel_Iks, Apr 9, 2008
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.