Compare commits

..

2 Commits

Author SHA1 Message Date
james c2c4d68837 6 commit 2024-05-21 10:30:06 +02:00
james d87b07ad38 6 commit 2024-05-21 10:12:02 +02:00
3 changed files with 22 additions and 2 deletions

View File

@ -5,8 +5,18 @@ let lista
fetch(url)
.then(response => response.json())
.then(data => {
wyswietlSufiksy(data)
});
function wyswietlSufiksy(data) {
data.forEach((element) => document.querySelector('#nieposortowane').innerHTML += `<li> ${JSON.stringify(element.osoby)} </li>`);
}
}
document.getElementById("nieposortowane").onmouseover = function() {mouseOver()};
document.getElementById("nieposortowane").onmouseout = function() {mouseOut()};
function mouseOver() {
document.getElementById("nieposortowane").style.color = "red";
}
function mouseOut() {
document.getElementById("nieposortowane").style.color = "black";
}

View File

@ -10,8 +10,9 @@
</head>
<body>
<h1>Sortowanie Sufiksów</h1>
<button onclick="sortujSufiksy()">Sortuj Sufiksy</button>
<button onclick="wyswietlSufiksy()">Wyswietl Sufiksy</button>
<h2>Nieposortowane Sufiksy</h2>
<div class="pre" id="nieposortowane"></div>
<h2>Posortowane Sufiksy</h2>

View File

@ -50,6 +50,15 @@ h2 {
flex-direction: column;
}
/* li:hover {
color: red;
font-weight: bold;
}
#nieposortowane:hover {
background-color: white;
} */
/* .pre {
background-color: #fff;