-
-
-
-
+
+
diff --git a/2-ui/2-events/01-introduction-browser-events/01-hide-other/task.md b/2-ui/2-events/01-introduction-browser-events/01-hide-other/task.md
index 7cb0cb0c9..b41aa9516 100644
--- a/2-ui/2-events/01-introduction-browser-events/01-hide-other/task.md
+++ b/2-ui/2-events/01-introduction-browser-events/01-hide-other/task.md
@@ -2,10 +2,10 @@ importance: 5
---
-# Hide on click
+# Skjul ved klik
-Add JavaScript to the `button` to make `
` disappear when we click it.
+Tilføj JavaScript til `button` for at gøre `
` usynlig når vi klikker på den.
-The demo:
+Demo:
[iframe border=1 src="solution" height=80]
diff --git a/2-ui/2-events/01-introduction-browser-events/02-hide-self-onclick/solution.md b/2-ui/2-events/01-introduction-browser-events/02-hide-self-onclick/solution.md
index cded5b622..b8fbb4242 100644
--- a/2-ui/2-events/01-introduction-browser-events/02-hide-self-onclick/solution.md
+++ b/2-ui/2-events/01-introduction-browser-events/02-hide-self-onclick/solution.md
@@ -1,5 +1,5 @@
-Can use `this` in the handler to reference "the element itself" here:
+Du kan her bruge `this` i handleren til at referere til "elementet selv":
```html run height=50
-
+
```
diff --git a/2-ui/2-events/01-introduction-browser-events/02-hide-self-onclick/task.md b/2-ui/2-events/01-introduction-browser-events/02-hide-self-onclick/task.md
index 9ee8f18e1..61fa90f54 100644
--- a/2-ui/2-events/01-introduction-browser-events/02-hide-self-onclick/task.md
+++ b/2-ui/2-events/01-introduction-browser-events/02-hide-self-onclick/task.md
@@ -2,11 +2,11 @@ importance: 5
---
-# Hide self
+# Skjul dig selv
-Create a button that hides itself on click.
+Opret en knap, der skjuler sig selv ved klik.
```online
-Like this:
-
+Som dette:
+
```
diff --git a/2-ui/2-events/01-introduction-browser-events/03-which-handlers-run/solution.md b/2-ui/2-events/01-introduction-browser-events/03-which-handlers-run/solution.md
index d569f0e4d..e9b9bebb0 100644
--- a/2-ui/2-events/01-introduction-browser-events/03-which-handlers-run/solution.md
+++ b/2-ui/2-events/01-introduction-browser-events/03-which-handlers-run/solution.md
@@ -1,8 +1,8 @@
-The answer: `1` and `2`.
+Svaret er `1` og `2`.
-The first handler triggers, because it's not removed by `removeEventListener`. To remove the handler we need to pass exactly the function that was assigned. And in the code a new function is passed, that looks the same, but is still another function.
+Den første handler afvikles, fordi den ikke er blevet fjernet af `removeEventListener`. For at fjerne handleren skal vi overføre præcis den funktion, der var tildelt. Og i koden bliver en ny funktion overført, som ser den samme ud, men er stadig en anden funktion.
-To remove a function object, we need to store a reference to it, like this:
+For at fjerne et funktionsobjekt, skal vi gemme en reference til det, sådan her:
```js
function handler() {
@@ -13,4 +13,4 @@ button.addEventListener("click", handler);
button.removeEventListener("click", handler);
```
-The handler `button.onclick` works independently and in addition to `addEventListener`.
+Handleren `button.onclick` virker uafhængigt og i tilføjelse til `addEventListener`.
diff --git a/2-ui/2-events/01-introduction-browser-events/03-which-handlers-run/task.md b/2-ui/2-events/01-introduction-browser-events/03-which-handlers-run/task.md
index f8cd75d5a..d9ea489b9 100644
--- a/2-ui/2-events/01-introduction-browser-events/03-which-handlers-run/task.md
+++ b/2-ui/2-events/01-introduction-browser-events/03-which-handlers-run/task.md
@@ -2,11 +2,11 @@ importance: 5
---
-# Which handlers run?
+# Hvilken handler vil blive afviklet?
-There's a button in the variable. There are no handlers on it.
+Der er et element i variablen (en knap). Der er ingen handlers på den.
-Which handlers run on click after the following code? Which alerts show up?
+Hvilke handlers afvikles ved klik efter følgende kode? Hvilke alerts vises?
```js no-beautify
button.addEventListener("click", () => alert("1"));
diff --git a/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/solution.md b/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/solution.md
index b04cb8231..f59799c45 100644
--- a/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/solution.md
+++ b/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/solution.md
@@ -1,11 +1,11 @@
-First we need to choose a method of positioning the ball.
+Først skal vi vælge en metode til at positionere bolden.
-We can't use `position:fixed` for it, because scrolling the page would move the ball from the field.
+Vi kan ikke bruge `position:fixed` til det, fordi scrolling af siden ville flytte bolden fra plænen.
-So we should use `position:absolute` and, to make the positioning really solid, make `field` itself positioned.
+Så vi bør bruge `position:absolute` og, for at gøre positioneringen virkelig solid, give selve `field` en `position`.
-Then the ball will be positioned relatively to the field:
+På den måde vil bolden blive positioneret relativt til plænen:
```css
#field {
@@ -16,36 +16,36 @@ Then the ball will be positioned relatively to the field:
#ball {
position: absolute;
- left: 0; /* relative to the closest positioned ancestor (field) */
+ left: 0; /* relativt til den nærmeste positionerede forælder (field) */
top: 0;
- transition: 1s all; /* CSS animation for left/top makes the ball fly */
+ transition: 1s all; /* CSS animation for left/top får bolden til at bevæge sig */
}
```
-Next we need to assign the correct `ball.style.left/top`. They contain field-relative coordinates now.
+Derefter skal vi tildele de korrekte `ball.style.left/top`. De indeholder nu koordinater relative til plænen.
-Here's the picture:
+Her er et billede:

-We have `event.clientX/clientY` -- window-relative coordinates of the click.
+Vi har `event.clientX/clientY` -- koordinater relativt til vinduet.
-To get field-relative `left` coordinate of the click, we can substract the field left edge and the border width:
+For at få et field-relativt `left` koordinat, kan vi trække fields venstre side og border tykkelse fra:
```js
let left = event.clientX - fieldCoords.left - field.clientLeft;
```
-Normally, `ball.style.left` means the "left edge of the element" (the ball). So if we assign that `left`, then the ball edge, not center, would be under the mouse cursor.
+Normalt betyder `ball.style.left` den "venstre kant af et element" (bolden). Så hvis vi tildeler den `left`, så vil det være boldens venstre side og ikke center der vil være under musemarkøren.
-We need to move the ball half-width left and half-height up to make it center.
+Vi skal flytte den halve bredde af bolden til venstre og den halve højde op for at centrere den.
-So the final `left` would be:
+Så den endelige `left` vil være:
```js
let left = event.clientX - fieldCoords.left - field.clientLeft - ball.offsetWidth/2;
```
-The vertical coordinate is calculated using the same logic.
+Den samme logik bruges til at beregne den lodrette koordinat.
-Please note that the ball width/height must be known at the time we access `ball.offsetWidth`. Should be specified in HTML or CSS.
+Bemærk, at boldens bredde/højde skal være kendt på det tidspunkt, hvor vi tilgår `ball.offsetWidth`. Den skal angives i HTML eller CSS.
diff --git a/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/solution.view/index.html b/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/solution.view/index.html
index 3ebe8739e..dea7d5d8a 100644
--- a/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/solution.view/index.html
+++ b/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/solution.view/index.html
@@ -1,75 +1,69 @@
-
+
-
-
-
-
-
-
-
-
- Click on a field to move the ball there.
-
-
-
-