[ Web Proxy ]
URL:
Viewing: https://da.javascript.info/task/behavior-nested-tooltip [Back]  [Original]

Improved tooltip behavior
DA

Vi nsker at gre dette open source-projekt tilgngeligt for folk over hele verden.

Hjlp med at overstte indholdet af denne tutorial til dit sprog!

    Sg p Javascript.info:
    Sg i tutorialen:
    Lyst temaMrkt tema
    DanskEnglishEspaolFranaisIndonesiaItalianoTrkeOzbek
    tilbage til lektionen
    Dette materiale er kun tilgngeligt p flgende sprog: English, Espaol, , Italiano, , , Trke, , Ozbek, . Hjlp os med at overstte til Dansk.

    Improved tooltip behavior

    vigtighed: 5

    Write JavaScript that shows a tooltip over an element with the attribute data-tooltip. The value of this attribute should become the tooltip text.

    Thats like the task Tooltip behavior, but here the annotated elements can be nested. The most deeply nested tooltip is shown.

    Only one tooltip may show up at the same time.

    For instance:

    <div data-tooltip="Here  is the house interior" id="house">
      <div data-tooltip="Here  is the roof" id="roof"></div>
      ...
      <a href="https://en.wikipedia.org/wiki/The_Three_Little_Pigs" data-tooltip="Read on">Hover over me</a>
    </div>

    The result in iframe:

    bn en sandbox til opgaven.

    lsning

    Web Proxy Viewer  |  New URL  |  Original Page