Skip to content

Instantly share code, notes, and snippets.

@nicoxxxcox
Created April 16, 2019 07:55
Show Gist options
  • Save nicoxxxcox/9e224367d820013a99a65fcb6c4e942d to your computer and use it in GitHub Desktop.
Save nicoxxxcox/9e224367d820013a99a65fcb6c4e942d to your computer and use it in GitHub Desktop.
Ajax base
$.ajax({
type: 'POST',
url: './modules/smi/templates/comments-ajax.php',
data: 'nb=' + nb + '&guid_idea=' + guid_idea,
success: function (html) {
if (html != '') {
$("#ul-comments").append(html);
$("#btn-next").attr("data-id", (parseInt(nb) + slice));
} else {
$("#btn-next").hide();
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment