I need to adjust the following code to make multiple requests for 3 separate pages (adjusting &page=1, &page=2, &page=3), other than repeating it 3 times how can I combine this?
$.getJSON("http://www.behance.net/v2/users/" + user + "/projects?api_key=" + api + "&callback=?&page=1", function (data) {
var project_str = "";
for (i = 0; i < data.projects.length; i++) {
obj = {};
obj = data.projects[i];
project_str += '<a class="link" href="#' + obj.id + '"><img src="' + obj.covers['404'] + '" /></a>';
}
$('#behance_container div').append(project_str);
});
Something like: