如何用 qTip2 和 jQuery 用 .hover 函数显示标题?
How to show the title with qTip2 and jQuery with .hover function?
我正在尝试使用 qTip2 和 jQuery 以及 .hover
函数在我的 JSP 页面的元素中设置标题。
代码:
$(document).ready(function() {
$('#send').qtip({
content: {
title: 'My Title'
}
});
});
"send" 是一个按钮,我正试图将鼠标悬停在上面并获取带有标题的消息。
好的,我在这里得到了答案。
添加 CSS:
<link rel="stylesheet" href="css/jquery.qtip.min.css">
添加库:
<script src="jquery/jquery-1.11.2.min.js"></script>
<script src="jquery/jquery.qtip.min.js"></script>
和脚本:
$(document).ready(function() {
alert('a');
$('#send').qtip({ // Grab some elements to apply the tooltip to
content: {
text: 'My common piece of text here'
}
});
});
我正在尝试使用 qTip2 和 jQuery 以及 .hover
函数在我的 JSP 页面的元素中设置标题。
代码:
$(document).ready(function() {
$('#send').qtip({
content: {
title: 'My Title'
}
});
});
"send" 是一个按钮,我正试图将鼠标悬停在上面并获取带有标题的消息。
好的,我在这里得到了答案。
添加 CSS:
<link rel="stylesheet" href="css/jquery.qtip.min.css">
添加库:
<script src="jquery/jquery-1.11.2.min.js"></script>
<script src="jquery/jquery.qtip.min.js"></script>
和脚本:
$(document).ready(function() {
alert('a');
$('#send').qtip({ // Grab some elements to apply the tooltip to
content: {
text: 'My common piece of text here'
}
});
});