jQuery(document).ready(function(a){a(document).on("click","#dina-load-more-comments",function(){var e=a(this),t=e.closest(".dina-load-more-comments-wrapper"),o=e.data("page"),n=e.data("post"),d=e.data("perpage");e.prop("disabled",!0).html('<i class="fal fa-spinner-third fa-spin"></i> '+dina_ajax.loading_text),a.ajax({url:dina_ajax.ajax_url,type:"POST",data:{action:"load_more_comments",nonce:dina_ajax.nonce,post_id:n,page:o,perpage:d},success:function(o){if(o.success&&o.data.html){var n=a(o.data.html);a("#dina-comment-list").append(n),o.data.no_more_comments?t.remove():(e.data("page",o.data.page),e.prop("disabled",!1).html('<i class="fal fa-comments"></i> '+dina_ajax.load_more_text))}else t.remove()},error:function(){e.prop("disabled",!1).html('<i class="fal fa-comments"></i> '+dina_ajax.load_more_text),alert(dina_ajax.error_text)}})})});