How can I visit to another pagination page or searching, the button does not work

Advertisements

The button action does not work after searching in the index page. The action button does not work on the second page.

My Ajax Script

$(document).on("click", "#pagination a, #search_btn, #reset_btn", function() {
    if(this.id == 'reset_btn'){
        $("#searchform").reset();
    }
  $.ajax({
    url: this.dataset.url,
    type: 'get',
    data:  $("#searchform").serialize(),
    processData: false,
    cache: false,
    contentType: false,
      success: function(data) {
        $("#pagination_data").html(data); 
      },
      failure: function (response) {
          alert(response.responseText);
      },
      error: function (response) {
          alert(responsiveness);
      }        
    });
  }) 
}); 

Using Ajax Pagination, you can create dynamic navigation links for pages and then load data without reloading the entire web page content. So, by using Ajax Pagination, we can add dynamic page content to the data list without having to refresh the web page content.

>Solution :

Simply solve the bug by inserting the code below into the button function script.

KTMenu.createInstances();

Leave a ReplyCancel reply