Reputation: 167
i'm developing a web page, inside there are auto load data, the script I took in tutorial website, but its weakness, text always blink every few seconds, if it can be made so as not to be blinking? I'm beginner for Ajax, and it makes me confused.
Here's code:
function loadValue5() {
$.ajax({
method: 'GET',
url: 'grab_count_old.php',
success: function(responseText) {
$('#amt').fadeOut('fast', function () {
$('#amt').val(responseText).fadeIn('fast', function() {
setTimeout(loadValue5, 100);
});
});
}
});
}
loadValue5();
Upvotes: 0
Views: 215
Reputation: 32354
remove the fade effects
function loadValue5() {
$.ajax({
method: 'GET',
url: 'grab_count_old.php',
success: function(responseText) {
$('#amt').val(responseText);
setTimeout(loadValue5, 100);
}
});
}
loadValue5();
Upvotes: 1