2012-05-25 2 views
0

코딩했는데 선택 윤곽 텍스트로 이동할 때 툴팁을로드하지 않습니다.jquery를 사용하여 선택 윤곽에 툴팁을 표시 할 수 없습니다.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> 
<script type="text/javascript" src="http://www.webringideas.com/wp-content/uploads/demo/tooltip/js/ntip.js"></script> 

<div id="fixedfooter"> 
    <marquee class="smooth_m" behavior="scroll" direction="left" onMouseOut="this.start()" onMouseOver="this.stop()" scrollamount="3"> 
     <div id="demo"> 

    <span style="color: #ff0000;" class="formInfo"> 
    <a href="#"> 
    <span style="color: #000000;display: none;" class="mycontent">test Successful for HTML Tooltip on marquee</span></a>Testing HTML Tooltip on marquee using jQuery and css 
    </span> 

    </div> 
    </marquee> 
</div> 

     <script type="text/javascript"> 
      $(document).ready(function(){ 
     $(".formInfo").tooltip({tooltipcontentclass:"mycontent"}) 
});; 
     </script> 

그러나, 나는 윤곽을 사용하고 있지 않다 때 같은 일이 잘 작동, 및 텍스트는 정적이다.

이이와 잘 작동

<span class="formInfo">Tooltip<span style="display: none;" class="mycontent">Testing <font color="red">HTML</font> content</span></span> 

당신이 내 천막에서 사용할 수있는 추천 할 수있는 툴팁이 있습니까? 감사합니다.

+0

는 또한 http://www.jquerytools.org/demos/tooltip/any-html.html 시도,하지만 난 때처럼되고 툴팁합니다 나는 마키 텍스트에서 마우스 커서를 제거하고 툴팁은 자동으로 숨기기 – Thompson

+0

'<3 선택 윤곽 '. 2 년 동안 이것을 보지 못했습니다. 오랫동안 오랫동안 사용하지 않으신 것이 있습니까? – Christoph

+0

그런 다음 내가 원하는 기능을 수행하는 데 사용할 수있는 것은 무엇입니까? onmouse를 끝내면 움직이는 텍스트가 멈추고 mouseout에서 다시 시작됩니다. – Thompson

답변

0

코드를 약간 수정했으며 작업 결과는 jsFiddle입니다.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> 
<script type="text/javascript" src="http://www.webringideas.com/wp-content/uploads/demo/tooltip/js/ntip.js"></script> 
<div id="fixedfooter"> 
<marquee class="smooth_m" behavior="scroll" direction="left" onmouseout="this.start()" onmouseover="this.stop()" scrollamount="3"> 
<div id="demo"> 
    <span style="color: #ff0000;" class="formInfo"> 
    <div class="mycontent" style="color: #000000;display:none;"> 
     test Successful for HTML Tooltip on marquee 
    </div> 
    <a href="#"></a>Testing HTML Tooltip on marquee using jQuery and css</span> 
</div> 
</marquee> 
</div> 

자바 스크립트 부분 :

$(document).ready(function() { 
    $(".formInfo").tooltip({ 
     tooltipcontentclass: "mycontent" 
    }) 
});; 
+0

감사합니다. 여기에 하나의 바람직하지 않은 오류가 발생했습니다. 여기에 화면 스냅 샷 http://i.imgur.com/SWquB.jpg가 있습니다. 선택 윤곽 텍스트 위로 마우스를 가져 가면 툴팁이 매우 (화면에 보이지 않습니다.) 표시됩니다 (아래 그림 참조). 나는 http://www.webringideas.com/wp-content/uploads/demo/tooltip/js/ntip.js에서 정렬 오류가있을 수 있다고 생각한다. – Thompson

+0

ntip에 익숙하지 않지만 줄이있다.'jQuery ('#NT') .css ({left : clickElementx + "px", top : clickElementy + "px"});'ntip.js 파일에서 위치를 정의합니다. 당신은 그걸 가지고 놀 수 있습니다. –

관련 문제