Show all Primefaces tooltip by clicking a button

Community Driven Extensions Project
Post Reply
dabuki
Posts: 4
Joined: 14 Mar 2015, 14:15

03 Feb 2016, 11:28

Hi,

I'm using PrimeFaces 5.3 with PrimeFaces Extensions 3.1.0.

I'd like to offer a button to the users that they can use to switch off/on all available Primefaces tooltips. If I know the id I can use

Code: Select all

PF('myid').show()
Nevertheless, I don't want to enumerate all ids for each tooltip on every page separately, but I want to show/hide all tooltips using a generic button. I thought of using the class associated with pe:tooltip like

Code: Select all

<p:commandButton value="Toggle" onclick="$('.ui-tooltip.content").show()" />
or

Code: Select all

 <p:commandButton value="Toggle" onclick="$('.ui-tooltip.content").attr('display','block'>" />
, but that doesn't work as the tooltips are only added to the DOM on hover apparently .

Any hints, on how to solve this?

Best regards,

Andreas

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests