0

I have a cluetip that is displayed when a user clicks a link. When the tip is displayed I want it to have a title but it does not want to show the title.

$('#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(),
        }
    }
});

I want the title to be displayed but its not showing up. This is the HTML im using.

<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>
Chris Quibell
  • 339
  • 3
  • 4
  • 18

1 Answers1

2

I have never used this plugin but going through the documentation, I wanted to suggest some changes which may work. In your JQuery code, make these changes and try it:

  • Remove all titleAttribute options.
  • Add instead a title attribute like <img id="spouseMortalityImage" title="Hello"/> in your markup to the correct tag with id spouseMortalityImage which you have shown in Jquery. In the markup you have posted currently, I do not see this element. Instead I see an <img> tag with ID clientMortalityImage
Gloria
  • 1,053
  • 8
  • 18
  • When I change the closePosition to 'top' my button does not show up, and the showTitle is true. – Chris Quibell Aug 06 '13 at 14:28
  • 1
    Your JQuery seems to be putting the clue tip on the element with ID `spouseMortalityImage` which I guess is just another image like `clientMortalityImage` which you have posted in your markup. Can you change the `closePosition` back to `'title'` and remove the `titleAttribute` option in your Jquery completely. Instead add a `title` attribute like `title="Hello"` in your `` tag where you want to display the cluetip on hover. – Gloria Aug 06 '13 at 14:52
  • Let me kow if this works. Sorry that the earlier suggestion did not work. As I said I am not familiar with this plugin. – Gloria Aug 06 '13 at 14:59
  • 1
    Thats Great! I have edited my answer to include what I wrote in the comment. Please Mark the answer as correct, so that people having similar issue will get the solution. – Gloria Aug 06 '13 at 15:15