【发布时间】:2009-09-02 16:37:06
【问题描述】:
如何从函数内部调用函数,使其成为递归的?这是我的代码,我添加了一条注释,我想在其中开始递归:
$('a.previous-photos, a.next-photos').click(function() {
var id = $('#media-photo img').attr('id');
var href = $(this).attr('href');
href = href.split('/');
var p = href[href.length - 1];
var url = '/view/album-photos/id/' + id + '/p/' + p;
$.get(url, function(data) {
$('.box-content2').replaceWith('<div class="box-content2"' + data + '</div>');
});
// here I want to call the function again
return false;
});
【问题讨论】:
标签: javascript jquery