diff --git a/agenda.html b/agenda.html index 002e9e8..4d76de7 100644 --- a/agenda.html +++ b/agenda.html @@ -13,6 +13,10 @@ + + @@ -34,5 +38,13 @@

Escritorio Virtual

Agenda

+ + + + \ No newline at end of file diff --git a/js/agenda.js b/js/agenda.js new file mode 100644 index 0000000..d7c9a05 --- /dev/null +++ b/js/agenda.js @@ -0,0 +1,56 @@ +class Agenda{ + + constructor(){ + this.url = "http://ergast.com/api/f1/current"; + this.last_api_call = null; + this.las_api_result = null; + } + + cargarDatos(){ + $.ajax({ + dataType: "xml", + url: this.url, + method: 'GET', + success: function(datos){ + //$("h5").text((new XMLSerializer()).serializeToString(datos)); + + //Presentación de los datos contenidos en XML + $.each($('Race',datos), function(item){ + var stringDatos = "