我需要为表中的特定列提供工具提示。我的观点:
<table class="tbl" id="dash" data-bind="with: Plan">
<thead>
<tr class="tag close">
<th>Type</th>
<th>Title</th>
</tr>
</thead>
<tbody class="scrollContent" data-bind="foreach: Course">
<tr>
<td><i class="icon"></i></td>
<td><a href="#" id="qtipselector_01" data-bind="text: Title"></a></td>
<div id="TooltipContent_01" class="hidden">
<a> Test Tool Tip</a>
</div>
</div>
</tr>
</tbody>
</table>
我已经包含了 jquery 和 jquery.qtip.js。
我写了一个函数来显示鼠标输入的工具提示。
$('#qtipselector_01').qtip({
content: $('div#TooltipContent_01').html(),
position: {
my: 'left center'
},
show: 'mouseenter',
hide: {
fixed: true,
delay: 500,
when: {
event: 'unfocus'
}
},
style: {
tip: {
width: 20,
height: 14,
},
width:280,
height:100,
classes: 'qtipabc',
}
});
主页
<script src="Scripts/jquery.js" type="text/javascript"></script>
<script src="Scripts/jquery.qtip.js"></script>
<!--Template binding--><!-- This is where my view is getting binded-->
<div id="Container" ua-app-id="topVm" data-bind='template: {name: pageModel, data: pageVM }'>
</div>
<script src="Scripts/abc.js"></script> <!--Place where .qtip is called-->
它现在不起作用。