Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
// for Wicket 1.4
add(JavascriptPackageResource.getHeaderContribution("javascript/addEvent.js"));
add(JavascriptPackageResource.getHeaderContribution("javascript/sweetTitles.js"));

// for Wicket 1.3.x
add(HeaderContributor.forJavaScript("javascript/addEvent.js"));
add(HeaderContributor.forJavaScript("javascript/sweetTitles.js"));

Step

...

Change

Code Block
display:block

to

Code Block
display:none

in the CSS selector

Code Block
div#toolTip p em

if you want to remove the text from targeted element e.g.

Code Block
<a>

Step 8: Add the tooltip

Add the attribute "showtooltip" to the element that should show a tooltip (only elements with this attibute will show tooltips):

...

Code Block
someWicketComponent.add(new AttributeModifier("title", true, new Model("Hi, I am a dynamic tooltip.")));

Step 9a: Remove element's text from the tip

Change

Code Block
display:block

to

Code Block
display:none

in the CSS selector div#toolTip p em if you just want to show the text in the Model. Otherwise, the element's text will be appended to the tip.

Step 10: There is no step 10

...