testing added some links

This commit is contained in:
Geir Okkenhaug Jerstad 2024-08-09 14:16:07 +02:00
parent 40be06c6e9
commit e3d486c0c4
2 changed files with 15 additions and 11 deletions

View file

@ -20,6 +20,8 @@
<a href="https://www.youtube.com/watch?v=Zi-Q0t4gMC8">Video link</a></li>
<li><a href="https://geokkjer.github.io/startit/MDN">MDN</a></li>
<li><a href="https://geokkjer.github.io/startit/the_good_parts">JavaScript: The good the_good_parts</a></li>
<li><a href="https://geokkjer.github.io/startit/eloquentjavascript">Eloquent Javascript</a></li>
<a href="https://eloquentjavascript.net/">Book Link</a>
</ol>
</div>

View file

@ -57,7 +57,6 @@
</div>
<h3>Bla opp og ned</h3>
<div style="display: flex;" id="numbersAndButtons">
</div>
<script>
showNumber1();
@ -76,27 +75,30 @@
}
function showNumber1() {
document.getElementById('numbersAndButtons').innerHTML = /*HTML*/ `
<button onclick="showNumber4"></button>
<button onclick="showNumber4()"></button>
<div style="width: 40px; text-align: center;">1</div>
<button onclick="showNumber2"></button>
<button onclick="showNumber2()"></button>
`;
}
function showNumber2() {
document.getElementById('numbersAndButtons').innerHTML = /*HTML*/ `
<button onclick="showNumber1"></button>
<button onclick="showNumber1()"></button>
<div style="width: 40px; text-align: center;">2</div>
<button onclick="showNumber3"></button>
<button onclick="showNumber3()"></button>
`;
}
function showNumber3() {
document.getElementById('numbersAndButtons').innerHTML = /*HTML*/ `
<button onclick="showNumber2"></button>
<button onclick="showNumber2()"></button>
<div style="width: 40px; text-align: center;">3</div>
<button onclick="showNumber4"></button>
<button onclick="showNumber4()"></button>
`;
}
function showNumber4() {
document.getElementById('numbersAndButtons').innerHTML = /*HTML*/ `
<button onclick="showNumber3"></button>
<div style="width: 40px; text-align: center;">1</div>
<button onclick="showNumber1"></button>
<button onclick="showNumber3()"></button>
<div style="width: 40px; text-align: center;">4</div>
<button onclick="showNumber1()"></button>
`;
}
</script>