我从http://tooltipsy.com/下载了 tooltipsy.min.js并将其放在与我的 html 文件相同的文件夹中。这是我的代码,它根本不起作用。为什么?包装 jquery 代码$(document).ready()
没有帮助。
<html>
<head>
<style>
.tooltipsy {
padding: 10px;
max-width: 200px;
color: #303030;
background-color: #f5f5b5;
border: 1px solid #deca7e;
}
</style>
<script type="text/javascript" src="jquery-3.1.1.slim.min.js"></script>
<script type="text/javascript" src="tooltipsy.min.js"></script>
<script type="text/javascript">
$('.hastip').tooltipsy();
</script>
</head>
<body>
<a class="hastip" title="I am the tooltip text">I want a tooltip</a>
</body>
</html>