I currently have an application that includes a search feature where users can look up items in the database. The search functionality is working well with AJAX, but I'm now looking to incorporate this AJAX functionality into my pagination system. Specifically, I am using Kaminari for pagination and would like to know how to integrate AJAX into it.
$(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",
});
}
});
});