JSFiddle - React, Tailwind, and code Playground
HTML
<input type="button" value="Search"/>
<br>
<div>
CONTENT GOES HERE
</div>
<br>
<a href="#" id="link1">1</a>
<a href="#" id="link1">2</a>
<a href="#" id="link1">3</a>
<a href="#" id="link1">4</a>
JavaScript
var page;
$("input:button, a").on("click",function()
{
page = !$(this).is("input:button") ? "?page=" + parseInt($(this).text()) + "" : "";
$.ajax({
method: "POST",
url: "/search" + page,
data: {
'do': getUrlParameter('do'),
'prop_type': prop_type,
'city': $('select[name="city"]').val(),
'zone': $('select[name="zone"]').val()
}
}).done(function(data) {
var new_content = $(data).find('#search');
$( "#search" ).html( new_content ); // here's the list and the pagination links
});
});