function show(){
$.ajax({
type: "POST",
url: "greetings.php",
data: "username="+$("#username").val(),
success: function(html){
$("#content").html(html);
}
});
return false;
};
$(document).ready(function(){
let $btn = $('.btn');
let interval = setInterval(function () {
$btn.click(show());
},1000); clearInterval(interval);
function show() {
$.ajax({
type: "POST",
url: "greetings.php",
data: "username=" + $("#username").val(),
success: function(html) {
$("#content").html(html);
}
});
return false;
}
let $btn = $('.btn');
let interval = setInterval(function() {
$('.btn').click(show());
}, 1000);
setTimeout(function() {
clearInterval(interval);
}, 1300);