0

我有一个提示,当用户单击链接时会显示。显示提示时,我希望它有一个标题,但它不想显示标题。

$('#spouseMortalityImage').cluetip({ 
    titleAttribute: 'alt',
    titleAttribute: 'Title',
    sticky: 'true',
    closeText: '<img align="right" width="16px" height="16px" src="../images/buttonTip.gif" alt="close" />',
    closePosition: 'title', 
    ajaxSettings:{
        data:{
            age:"<%= personalInfoBean.getSpouseAge()%>",
            gender:"<%= personalInfoBean.getSpouseGender()%>",
            country:$("input[name=planningCountry]").val(),
        }
    }
});

我希望显示标题,但不显示。这是我使用的 HTML。

<td class="centerAlignedContext" width="50%">
    <pp:text name="personalInfoBean" property="clientMortality" size="8" maxlength="3" style="text-align:center;" styleClass="wamoney" />
</td>
<td width="20%">  
    <a class="title" href="#" title="Chance of Survival"></a>
    <img id="clientMortalityImage" style="height:15px;" src="../images/suggestion.jpg" rel="ProbabilityOfSurvival.do"/>
</td>
4

1 回答 1

2

我从来没有使用过这个插件,但是通过文档,我想建议一些可能有效的更改。在您的 JQuery 代码中,进行这些更改并尝试一下:

  • 删除所有titleAttribute选项。
  • 而是将标记中的title属性添加到您在 Jquery 中显示的<img id="spouseMortalityImage" title="Hello"/>带有 id 的正确标记。spouseMortalityImage在您当前发布的标记中,我没有看到这个元素。相反,我看到一个<img>带有 ID 的标签clientMortalityImage
于 2013-08-06T14:22:55.447 回答