2013-09-23 2 views
0

http://qtip2.com/ 툴팁을 사용 중입니다. 이 코드를 사용하여 해당 미안 위해, 숨겨진 요소를 사용하려면 :숨겨진 요소가있는 Qtip2- 툴팁이 표시되지 않습니다.

<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> 

당신이 위에 마우스를 올려 경우 "를 참조 나에게 가져 가면 :

그리고이 코드를 아래

<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 
     } 
    }); 
}); 
// ]]> 
툴팁 ", 툴팁이 표시되지 않습니까? 모르겠어, 왜? 나는 그것의 Qtip2에서이 문제를 생각

답변

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) -> 
    } 

, 내가 수동으로 클래스를 제거했다