2011-12-06 2 views
1

사용자가 하루 이상 움직일 때 도구 설명이 나타나기를 원하지만, 사용자가 하루를 클릭하면 별도의 도구 설명이 나타나기를 바랍니다. 지금까지 내가 떠들면 아무 일도 일어나지 않지만 클릭하면 작동합니다.하나의 요소에 여러 개의 Q 팁이 작동하지 않습니다.

HTML :

echo "<span><a href='#' class='add_event_tooltip tooltip' title="\$list_day\">$list_day</a></span>"; 

JQuery와 :

<script type="text/javascript"><!-- TOOL TIP --> 
$('.tooltip').live('mouseover', function(event) { 
    $(this).qtip({ 
     overwrite: true, 
     position: { viewport: $(window)}, 
     style: { 
     classes: 'ui-tooltip-shadow ui-tooltip-rounded' 
     }, 
     show: { 
     event: event.type, 
     ready: true 
     } 
    }, event); 
}) 
</script> 
<script language="javascript" type="text/javascript"> 
$('.add_event_tooltip').qtip({ 
     content: { 
      ajax: { 
       url: 'test.html' 
      }, 
     }, 
     position: { 
      my: 'center', // ...at the center of the viewport 
      at: 'center', 
      target: $(window) 
     }, 
     show: { 
      event: 'click', // Show it on click... 
      solo: true, // ...and hide all other tooltips... 
      modal: true // ...and make it modal 
     }, 
     hide: false, 
     style: 'ui-tooltip-light ui-tooltip-rounded' 
}); 
</script> 

는 하나 개의 클래스가 오버 타고 다른 클래스라고 할 수 있습니까? 그렇다면 두 툴팁이 서로 작동하고 마우스 오버시 툴팁, 클릭시 .add_event_tool을 어떻게 얻을 수 있습니까?

감사합니다.

답변

0
style:"class: 'ui-tooltip-shadow ui-tooltip-rounded'" 

클래스가 아니어야합니다. 클래스에 적용 해보세요.

style:"class:'ui-tooltip-light ui-tooltip-rounded'" 

여기에 수업이 없습니다. 다른 것들이 좋습니다. 지금 시도하십시오

+0

하지만 qtip 자체, 즉에 문제가 발생하지 않는 것을 바로 스타일. – DanielOlivasJr

0

해결책은 최신 버전의 qTip2로 변경되었을 수 있습니다. 여러 q 팁을 동일한 대상에서 작동 시키려면 overwrite : false 옵션을 두 번째 qtip에 추가해야했습니다.

http://qtip2.com/options#core.overwrite

죄송
관련 문제