diff --git a/css.css b/css.css new file mode 100644 index 0000000..3f9240e --- /dev/null +++ b/css.css @@ -0,0 +1,3 @@ +body{ + margin: 10px; +} \ No newline at end of file diff --git a/index.html b/index.html index 97222aa..951f6ac 100644 --- a/index.html +++ b/index.html @@ -5,42 +5,85 @@ - api test + + Api test -
- + + +

+ Volba Dopravy +

+ + + + + + + + - - - + + + + .done(function(data){ + console.log(data); + for (let index = 0; index < data.length; index++) { + const item = data[index]; + $("#mista").append("
"); + } + + let radia = document.querySelectorAll("input[name='mista']"); + console.log(radia); + for (let index = 0; index < radia.length; index++) { + const element = radia[index]; + element.addEventListener("change", function() { + console.log(this); + $("#misto").html($(this).data("nazev")); + $('#exampleModal').modal('hide'); + }); + + } + + }) + .fail(function(){ + console.log("chyba ..."); + }); + \ No newline at end of file