툴팁 JS 질문입니다.

Extra Form
PHP PHP 7.3
CMS Rhymix 2.0

툴팁(Tooltip)이 페이지 로드시 자동으로 나왔다가 일정 시간이 지나면 닫히게 하고 싶어서 검색을 하던 중 딱 원하는 내용을 찾았습니다.

 

http://jsfiddle.net/apougher/Lvzuz/

 

<h2>Show ToolTip on Page Load and then hide after period</h2><p><span class="font-regular">Timed tooltip example on a href</span>—like<a href="#" rel="tooltip" data-original-title="Place your stuff here">this example</a>, <a href="#" rel="tooltip" data-original-title="Just other tool tip data">with other tips about</a></p>

 

$('p a').tooltip().eq(0).tooltip('show').tooltip('disable').one('mouseout', function() {
  $(this).tooltip('enable');
});

setTimeout(function() {
 $('p a').tooltip().eq(0).tooltip('hide').tooltip('enable');
}, 5000);

 

그런데 이걸 외부 페이지에 적용하려고 하니 전혀 작동을 안하네요^^;;

하단 js 내용은 <script></script>로 감싸주었습니다.

 

느낌상으론 저 명령어들이 작동할 수 있게 자바스크립트나 제이쿼리를 로드하는 과정이 있어야 할 것 같아서

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

이 라인도 넣어봤는데, 아~무런 반응이 없네요.

 

왜 그럴까요?

 

 

 

  • profile
    jQuery.ui 라든가 별도의 라이브러리를 사용하는 게 아닐까요?
  • profile profile
    크으.. 말씀듣고 위 링크를 잘살펴보니 리소스에 부트스트랩이 들어가있네요 ㅎ. 부트스트랩 불러와서 해봐야겠네요!