Skip to content

Instantly share code, notes, and snippets.

View eduard01982's full-sized avatar
🏠
Working from home

Eduard0 eduard01982

🏠
Working from home
View GitHub Profile
@eduard01982
eduard01982 / refresh.html
Created March 4, 2022 11:37
Refrescar solo una parte de una pagina web, con un div y jquery
$(document).ready(function () {
var interval = 500; //número de milisegudos en que vuelve a hacer la llamada de la función.
var refresh = function() {
$.ajax({
url: "path/to/server/page.php",
cache: false,
success: function(html) {
$('#server-name').html(html);
setTimeout(function() {
refresh();