0

I´m using the http://qtip2.com/ tooltips. I want to use a hidden element, for that i´m using this code:

<script type="text/javascript">

// <![CDATA[
// Grab all elements with the class "hasTooltip"
$('.hasTooltip').each(function() { // Notice the .each() loop, discussed below
    $(this).qtip({
        content: {
            text: $(this).next('div') // Use the "div" element next to this for the content
        }
    });
});
// ]]>

And under this code:

<div class="hasTooltip">Hover me to see a tooltip</div>
<div class="hidden">
<!-- This class should hide the element, change it if needed -->
<p><strong>Complex HTML</strong> for your tooltip <em>here</em>!</p>
</div>

If you hover over the "Hover me to see a tooltip", no tooltip is shown? No idea, why?

1 Answers1

0
  events: {
    render: (event, api) ->
    show: (event, api) ->
      $('.qtip:visible').qtip('hide')
      elements = $(api.get('content.text')).removeClass('hidden')
      api.set('content.text', elements)
    ,
    hide: (event, api) ->
  }

I think its a bug in Qtip2, i had to manually remove the class

amdstorm
  • 66
  • 6