1
如果我的鏈接在模板之外,那麼工具提示工作正常,但是如果它在JQuery模板中根本不起作用。嘗試了很多例子,但沒有成功。JQuery工具提示無法使用Jquery模板工作。需要幫助
下面是代碼
在JS文件格加載
ReloadGrid();
$(".hello").tooltip({
track: true,
delay: 0,
showURL: false,
fade: 250,
bodyHandler: function() {
return $($(this).next().html());
},
showURL: false
});
後頁
<script id="cellTemplate" type="text/x-jQuery-tmpl">
<tr class="gridRowCursor" >
<td class="cellTd ">
<input type="checkbox" id="deleteCb" />
<input type="hidden" id="Id_ + ${Id}" class="idField" value="${Id}" />
</td>
<td class="cellTd">
<input id="index" name="index" class="numberField" type="text" value="${IndexOrder}" />
</td>
<td class="cellTdLeft" style="font-size:11px;">
<a class="hello" href="#">{{html DisplayName}}</a>
<div id="tooltip" style="display: none">
<div>
{{html UrlName}}
</div>
</div>
</td>
<td class="cellTd ">
<input type="checkbox" id="activeCb" {{if Active}} checked{{/if}} />
</td>
</tr>
<tr id="${Id}" class="gridRow" style="display: none;">
<td class="cellTdLeft" colspan="5" style="padding-left: 15px; font-size:11px;">
{{html UrlName}}
</td>
</tr>
</script>
<span class="instructions">Only numeric value is allowed in IndexOrder textbox.</span>
<div class="gridDiv">
<table id="set1" class="gridTable" cellspacing="0" cellpadding="0" >
<thead>
<tr class="gridTitleRow">
<td class="iconLink width36">Delete</td>
<td class="iconLink width60">Sort Order</td>
<td class="iconLink width500">Display Name</td>
<td class="iconLink widthAuto">Active</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
使用活得像下面。不工作?
$(".hello").live("tooltip", function() {
track: true,
delay: 0,
showURL: false,
fade: 250,
bodyHandler: function() {
return $($(this).next().html());
},
showURL: false
});
我使用你的建議編輯了我的問題,對嗎?工具提示不支持。你能發佈完整的工具提示代碼嗎? – Pirzada