‘,
replycount = ‘5’,
threadlimit = ‘2’,
pagelimit = ‘5’;
btn.click(function(e) {
pg = parseInt($(this).attr(‘data-page’));
$(this).hide();
$(“#allCommentsList”).append(loading_message);
$.get(url, {pg: pg, talkboxid: talkboxid, sort: sortParams, replycount: replycount, threadlimit: threadlimit, pagelimit:pagelimit}, function(data) {
data = jQuery.parseJSON(data);
if (data && data.length) {
$(btn).attr(‘data-page’, pg+1);
$(“#singleComment”).tmpl(data.slice(0,parseInt(pagelimit)), {thread_limit: 0}).appendTo(“#allCommentsList”);
$(“.reply-form”).each(function() {
Guestbook.AddPlaceholder(this);
});
if (data.length >= 5) {
$(btn).show();
}
if (window.removeDeletedTrees) {
removeDeletedTrees(“#allCommentsList”);
}
$(“#allCommentsList”).children(“.loading-message”).remove();
}
});
});
var count = parseInt(‘6’);
if (count > 5) {
btn.fadeIn(200);
}
});
{{= “”}}ipt>