我想让qTip工作,但它不会显示任何工具提示。这是我的代码:
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript">
</script>
<script src="@Url.Content("~/Scripts/jquery.qtip-1.0.0-rc3.min.js")" type="text/javascript"></script>
<script type="text/javascript">
// Create the tooltips only on document load
$(document).ready(function () {
$("#question").each(function() {
qtip({
content: 'Dark themes are all the rage!',
show: 'mouseover',
hide: 'mouseout'
style: {
name: 'dark', // Inherit from preset style
}
});
</script>
我有一个看起来像这样的div容器:
<div id="question">@Html.LabelFor(y => item.question_wording, item.question_wording)</div>
我做错了什么?
答案 0 :(得分:0)
您的代码应如下所示:
$(document).ready(function () {
$("#question").each(function() {
$(this).qtip({
content: 'Dark themes are all the rage!',
style: {
name: 'dark' // Inherit from preset style
}
show: 'mouseover',
hide: 'mouseout'
});
});
});
不太确定隐藏/显示选项是否正确。