테스트 사이트 - 개발 중인 베타 버전입니다

tooltipsy 사용하기 쉬운 jquery library

· 7년 전 · 2501

a 태그에 title 이 있으면 툴팁이 mouseover 시 나타나고 mouseout시 사라집니다.

tooltipsy jquery 라이브러리는 옵션에 따라 click 시에 나타나게 할 수 있고 태그도 입력이 가능하고 나타 나는 위치를 설정할 수도 있습니다.

 

다음과 같이 사용하면 링크2와 같이 사용됩니다.

.tooltipsy {
    position:relative;
    padding: 10px;
    max-width: 200px;
    color: #303030;
    background-color: #f5f5b5;
    border: 1px solid #deca7e;
}
.tooltipsy:after {
    position:absolute;
    content:'';
    bottom:-6px;
    left:50%;
    margin-left:-5px;
    width:10px; height:10px;
    background-color: #f5f5b5;
    border-right:1px solid #deca7e;
    border-bottom:1px solid #deca7e;
    display:block;
    transform:rotate(45deg);
}
</style>
<a href="#" class="hastip">tooltipsy</a>
<script>
$('.hastip').tooltipsy({
    offset: [0, -5],
    showEvent: 'click',
    hideEvent: 'click',
    content: '<strong>Hello, tooltipsy!</strong><br><a href="https://github.com/briancray/tooltipsy" style="color:blue;">tooltipsy github</a>'
    
});

</script>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

게시글 목록

번호 제목
18200
18195
18193
18181
18179
18173
18170
18164
18158
18155
18152
18151
18150
18140
18139
18138
18131
18130
18120
18119
18118
18117
18116
18111
18110
18108
18107
18106
18100
18090