我正在使用 jQuery Tooltip 1.3 和 jQuery 1.7。当我向锚标记添加标题属性时,工具提示功能;但是,当我尝试使用bodyHandler
它时它不起作用。我无法在bodyHandler
函数中将任何内容记录到控制台,这让我相信它只是从未被调用过。
HTML:
<a href="#awrap-exhibitor-listing" class="em-tooltip tooltip-directory" data-original-title="">View how your listing will appear in the directory:</a>
<div id="awrap-exhibitor-listing" class="wrap-exhibitor-listing" style="display: none; ">
<div class="em-show-directory-example">
<div class="sd-company-booth">
<div class="sd-company display-inline-block">1st Guard Corporation</div>
<div class="sd-booth display-inline-block float-right">12093</div>
</div>
<div class="sd-address">200 Nokomis Avenue South, 4th Floor</div><div class="sd-locale">Venice, Florida 34285</div>
<div class="sd-phone">(800) 995-4827</div>
<div class="sd-name">Courtney Wilson</div>
<div class="sd-phone">www.1stguard.com</div>
<div class="sd-product">
<strong>WILL DISPLAY:</strong> INSURANCE FOR LEASED OWNER OPERATORS - PHYSICAL DAMAGE, NONTRUCKING LIABILITY AND OCCUPATIONAL ACCIDENT INSURANCE
</div>
</div>
<div class="em-el-categories">Your listing will display alphabetically and under the following categories: <span class="em-el-category">Insurance</span>
</div>
</div>
JS:
Drupal.tooltipDirectoryListing = function() {
$('.wrap-exhibitor-listing').hide();
$('.tooltip-directory').tooltip(
{
bodyHandler: function() {
return $($(this).attr("href")).html();
},
showURL: false
}
);
}