I have a app with search functionality. The index page displays all the items in the database. Also when I search my products it works using AJAX. How to add AJAX functionality to my pagination? I'm using Kaminari for my pagination.
$(function() {
$( "#name" ).autocomplete({
source: "shirts/autocomplete",
autoFocus: false,
minLength: 1,
select: function(event,ui){
document.getElementById("name").value = ui.item.value;
$.ajax({
url:"shirts/show?name="+ui.item.value,
type:"GET",
});
}
});
});