Text popup over any word/item/hyperlink

Discussion in 'Javascript' started by jodleren, Nov 18, 2009.

  1. jodleren

    jodleren Guest

    Hi all

    I looked around, and can only find items for poping up images.
    I want to have a text over a link, the when the mouse is over a link
    (and later any text). Link the "alt" over a image (which btw does not
    appear in Firefox)

    WBR
    Sonnich
    jodleren, Nov 18, 2009
    #1
    1. Advertising

  2. jodleren

    jodleren Guest

    On Nov 18, 6:13 pm, jodleren <> wrote:
    > Hi all
    >
    > I looked around, and can only find items for poping up images.
    > I want to have a text over a link, the when the mouse is over a link
    > (and later any text). Link the "alt" over a image (which btw does not
    > appear in Firefox)
    >
    > WBRSonnich


    I found a script by Thomas Brattli, which needed some heavy update,
    but it works.

    It would probably be too lonk to add here :) My test in total is 119
    lines.

    WBR
    Sonnich
    jodleren, Nov 18, 2009
    #2
    1. Advertising

  3. jodleren

    lcplben Guest

    On Nov 18, 11:13 am, jodleren <> wrote:
    > Hi all
    >
    > I looked around, and can only find items for poping up images.
    > I want to have a text over a link, the when the mouse is over a link
    > (and later any text). Link the "alt" over a image (which btw does not
    > appear in Firefox)
    >
    > WBR
    > Sonnich


    Have you tried to give the link element a title? As in:

    <a href="http://www.nowhere.com" title="link to nowhere">nowhere!</
    a>

    That usually works for me.

    Do the same for images, of course preserving the "alt", and Firefox
    will show that title.

    HTH

    -- ben
    lcplben, Nov 18, 2009
    #3
  4. jodleren

    lcplben Guest

    On Nov 18, 11:13 am, jodleren <> wrote:
    > Hi all
    >
    > I looked around, and can only find items for poping up images.
    > I want to have a text over a link, the when the mouse is over a link
    > (and later any text). Link the "alt" over a image (which btw does not
    > appear in Firefox)
    >
    > WBR
    > Sonnich


    Have you tried to give the link element a title? As in:

    <a href="http://www.nowhere.com" title="link to nowhere">nowhere!</a>

    That usually works for me.

    Do the same for images, of course also preserving the "alt", and
    Firefox
    will show that title.

    HTH

    -- ben
    lcplben, Nov 18, 2009
    #4
  5. jodleren

    SAM Guest

    Le 11/18/09 7:09 PM, jodleren a écrit :
    > On Nov 18, 6:13 pm, jodleren <> wrote:
    >> Hi all
    >>
    >> I looked around, and can only find items for poping up images.
    >> I want to have a text over a link, the when the mouse is over a link
    >> (and later any text). Link the "alt" over a image (which btw does not
    >> appear in Firefox)


    empty the alt attribute or use it for what it is
    and use instead the attribute title

    <a href="p1.htm"><img src="1.jpg"
    alt="menu 1" title="Go to page #1"></a>


    > I found a script by Thomas Brattli, which needed some heavy update,
    > but it works.


    A very simple example (whithout JavaScript !) :

    <style type="text/css">
    ..bull_info { text-decoration: none; position: relative }
    ..bull_info span { position: absolute; top:.1em; left:2em;
    color: blue; background: #ffc; padding: 5px; border: 1px solid;
    display: none }
    ..bull_info:hover span { display: block; z-index: +1; }
    </style>

    <a href="#" class="bull_info"><img src="1.jpg" alt=""><span>Some
    info</span></a>

    > It would probably be too lonk to add here :) My test in total is 119
    > lines.


    Ask google about "tool tip"

    see :
    <http://www.walterzorn.com/tooltip/tooltip_e.htm>

    --
    sm
    SAM, Nov 20, 2009
    #5
  6. jodleren wrote:

    > I looked around, and can only find items for poping up images.
    > I want to have a text over a link, the when the mouse is over a link
    > (and later any text). Link the "alt" over a image (which btw does not
    > appear in Firefox)


    "Don't seek answers, seek better questions"
    (Jan Hautekiet)

    --
    Bart
    Bart Van der Donck, Nov 22, 2009
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. davetichenor
    Replies:
    1
    Views:
    810
    Eliyahu Goldin
    Oct 30, 2006
  2. Ken
    Replies:
    1
    Views:
    365
    Alvin Bruney
    Aug 16, 2003
  3. Dave
    Replies:
    0
    Views:
    928
  4. Jens Peter Hansen
    Replies:
    7
    Views:
    503
    Randy Webb
    Jun 19, 2004
  5. Guest
    Replies:
    4
    Views:
    287
    Guest
    May 12, 2006
Loading...

Share This Page