Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

title popups automatically without delay

is there any chance to do a js onclick function, that if someone will click on that icon automatically the title text will be shown, or just when someone moves mouse over it, title will be shown without any delay? Right now title for element comes out after 1 sec.

like image 308
Y2ok Avatar asked Oct 28 '11 10:10

Y2ok


1 Answers

you can try this, pure css, without js:

HTML:

<div class="hover">
    Hover Me
    <div class="tooltip">
        Tooltip goes here
    </div>
</div>​

CSS:

.hover{
    border:1px solid black;
    text-align:center;
    width:150px;
    position:relative;
}

.tooltip{
    display:none;
    position:absolute;
    border:1px solid red;
    border-radius: 5px;
    padding:5px;
    top:-10px;
    left:200px;
    width: 300px;
}

.hover:hover .tooltip{
    display:block;
}​

http://jsfiddle.net/kamil335/qGTUc/

like image 139
Marian Bazalik Avatar answered Oct 24 '22 19:10

Marian Bazalik