2012-10-12 7 views
-1

jQuery에서 아래에 언급 된 함수가 있습니다. 호출해야하지만 수행 방법을 모릅니다. jQuery에서 함수를 호출하는 방법

$(document).ready(function(){ 
    var url="example4.php"; 
    $('#letter-a').click(function(){ 
     $.getJSON(
      url + '?callback=?', 
      function(data){   
       $('#content').empty(); 
       $.each(data, function(index, entry){ 
       var html = '<div class="entry">'; 
       html += '<h3 class="word">' + entry['word'] + '</h3>'; 
       html += '<h3 class="word">' + entry[ word ] + '</h3>' ; 
       html += '<div class="function">' + entry['function'] + '</div>'; 
       html += '<div class="definition">' + entry['definition'] + '</div>'; 
       html += '</div>'; 
       $('#content').fadeIn().append(html); 
      }); 
     }); 
    return false; 
    }); 
}); 
+2

코드는 많은 구문 오류가 있습니다. – undefined

+1

당신은 그냥 googleing하여 해결할 수 – PaperThick

답변

2

프로그래밍 방식 ID letter-a 이상에서 요소를 클릭하여 전화의 아주 URE 의견을 공유하십시오

$("#letter-a").click(); 
관련 문제