JQuery recursive function?
<p>How can I call a function from inside the function, so it becomes recursive? Here is my code, I have added a comment where I would like to start the recursion:</p>

<pre><code>$('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('&lt;div class="box-content2"' + data + '&lt;/div&gt;');
    });

    // here I want to call the function again

    return false;
});
</code></pre>
