I’m using jQuery qTip to provide tooltips on a set of buttons, but the buttons are initially hidden by default until another action on the page triggers them to display. However, my qTip tooltips are still appearing if you mouseover where the hidden buttons are located on the page.
Since I’m fading the buttons in, I need to animate their opacity from 0 to 1, so I can’t hide the buttons totally with display: none (which I believe is why they’re still reacting to the mouseover event). Is there any way I can disable the tooltips when the opacity is 0?
I discovered that qTip tips won’t trigger on elements with
visibility: hidden, so I fixed this by setting both theopacityand thevisibilityon the buttons’ container:Then toggling the
visibilitybefore animating theopacity: