Hello,
I want to add search feature to this pagination code
Search without submit
“`
<input type=”text” id=”search” placeholder=”search”>
If the search word is empty, all will be listed
If there is a search word, it will list the search results
“`
$(document).ready(function(){
var totalPage = parseInt($(‘#totalPages’).val());
console.log(“==totalPage==”+totalPage);
var pag = $(‘#pagination’).simplePaginator({
totalPages: totalPage,
maxButtonsVisible: 5,
currentPage: 1,
nextLabel: ‘Next’,
prevLabel: ‘Prev’,
firstLabel: ‘First’,
lastLabel: ‘Last’,
clickCurrentPage: true,
pageChange: function(page) {
$(“#content”).html(‘<tr><td colspan=”6″><strong>loading…</strong></td></tr>’);
$.ajax({
url:”load_data.php”,
method:”POST”,
dataType: “json”,
data:{page: page},
success:function(responseData){
$(‘#content’).html(responseData.html);
}
});
}
});
});
No problem with code in load_data.php