tooltipster を使用してツールチップをカスタマイズする方法について、過去数時間、コンピューターに頭をぶつけてきました。私は現在やっています:
index.html の先頭:
<head>
<!--TOOLTIP CSS-->
<link rel="stylesheet" type="type/css" href="node_modules/tooltipster-master/css/tooltipster.css">
<!-- JQUERY -->
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<!-- TOOLTIP SCRIPT -->
<script src="node_modules/tooltipster-master/js/jquery.tooltipster.min.js"></script>
<script>
$(document).ready(function() {
$('.my-tooltip').tooltipster({
theme: 'tooltipster-noir'
});
});
</script>
</head>
index.html の本体:
<div class="my-tooltip" title="the message i want to tooltip out">Hover over me!</div>
問題は、これでも色/テーマ/位置を変更せずに非常に基本的なツールチップが得られることです。皆さんにも経験があるなら、ぜひ聞いてみたいです!