我在 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;
});
});