2010-05-05 6 views
0

간단한 함수를 만들려고하는데, 실행 중에 firebug가 함수가 존재하지 않는다고 말합니다.생성 된 함수를 찾을 수 없습니다.

<script type="text/javascript"> 
function load_qtip(apply_qtip_to) { 
    $(apply_qtip_to).each(function(){ 
     $(this).qtip(
     { 
     content: { 
      // Set the text to an image HTML string with the correct src URL to the loading image you want to use 
      text: '<img class="throbber" src="/projects/qtip/images/throbber.gif" alt="Loading..." />', 
      url: $(this).attr('rel'), // Use the rel attribute of each element for the url to load 
      title: { 
       text: 'Nieuwsbladshop.be - ' + $(this).attr('tooltip'), // Give the tooltip a title using each elements text 
       //button: 'Sluiten' // Show a close link in the title 
      } 
     }, 
     position: { 
      corner: { 
       target: 'bottomMiddle', // Position the tooltip above the link 
       tooltip: 'topMiddle' 
      }, 
      adjust: { 
       screen: true // Keep the tooltip on-screen at all times 
      } 
     }, 
     show: { 
      when: 'mouseover', 
      solo: true // Only show one tooltip at a time 
     }, 
     hide: 'mouseout', 
     style: { 
      tip: true, // Apply a speech bubble tip to the tooltip at the designated tooltip corner 
      border: { 
       width: 0, 
       radius: 4 
      }, 
      name: 'light', // Use the default light style 
      width: 250 // Set the tooltip width 
     } 
     }) 
    } 
} 
</script> 

그리고 난 여기가 전화를하려고 해요 :

여기에 기능 코드는 내가 잘못 뭐하는 거지

<script type="text/javascript"> 
// Create the tooltips only on document load 
$(document).ready(function() 
{ 
    load_qtip('#shopcarousel a[rel]'); 
    // Use the each() method to gain access to each elements attributes 
}); 
</script> 

?

+0

에 코드를 붙여 시도 같은 HTML 파일에 두 조각이? – meo

+0

예, 그렇습니다. 그들은 아마도 같은

관련 문제