Skip to content

Commit 9002711

Browse files
authored
Merge pull request #318 from Leired7/walking-the-dom
Walking the DOM
2 parents 94c1c13 + eb16ae9 commit 9002711

File tree

6 files changed

+128
-128
lines changed

6 files changed

+128
-128
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
There are many ways, for instance:
1+
Hay muchas maneras, por ejemplo:
22

33

4-
The `<div>` DOM node:
4+
El nodo `<div>` del DOM:
55

66
```js
77
document.body.firstElementChild
8-
// or
8+
// o
99
document.body.children[0]
10-
// or (the first node is space, so we take 2nd)
10+
// o (el primer nodo es un espacio, así que tomamos el segundo)
1111
document.body.childNodes[1]
1212
```
1313

14-
The `<ul>` DOM node:
14+
El nodo `<ul>` del DOM:
1515

1616
```js
1717
document.body.lastElementChild
18-
// or
18+
// o
1919
document.body.children[1]
2020
```
2121

22-
The second `<li>` (with Pete):
22+
El segundo `<li>` (con Pete):
2323

2424
```js
25-
// get <ul>, and then get its last element child
25+
// obtener <ul>, y luego obtener su último elemento hijo
2626
document.body.lastElementChild.lastElementChild
2727
```

2-ui/1-document/03-dom-navigation/1-dom-children/task.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ importance: 5
44

55
# DOM children
66

7-
Look at this page:
7+
Mira esta página:
88

99
```html
1010
<html>
@@ -18,7 +18,7 @@ Look at this page:
1818
</html>
1919
```
2020

21-
For each of the following, give at least one way of how to access them:
22-
- The `<div>` DOM node?
23-
- The `<ul>` DOM node?
24-
- The second `<li>` (with Pete)?
21+
Para cada una de las siguientes preguntas, da al menos una forma de cómo acceder a ellos:
22+
- ¿El nodo `<div>` del DOM?
23+
- ¿El nodo `<ul>` del DOM?
24+
- El segundo `<li>` (con Pete)?

2-ui/1-document/03-dom-navigation/3-navigation-links-which-null/task.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ importance: 5
22

33
---
44

5-
# The sibling question
5+
# La pregunta de los hermanos
66

7-
If `elem` -- is an arbitrary DOM element node...
7+
Si `elem` -- es un elemento nodo arbitrario del DOM...
88

9-
- Is it true that `elem.lastChild.nextSibling` is always `null`?
10-
- Is it true that `elem.children[0].previousSibling` is always `null` ?
9+
- ¿Es cierto que `elem.lastChild.nextSibling` siempre es `null`?
10+
- ¿Es cierto que `elem.children[0].previousSibling` siempre es `null` ?
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
We'll be using `rows` and `cells` properties to access diagonal table cells.
1+
Usaremos las propiedades de las `filas` y las `celdas` para acceder a las celdas de la tabla diagonal

2-ui/1-document/03-dom-navigation/4-select-diagonal-cells/task.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ importance: 5
22

33
---
44

5-
# Select all diagonal cells
5+
# Seleccionar todas las celdas diagonales
66

7-
Write the code to paint all diagonal table cells in red.
7+
Escribe el código para pintar todas las celdas diagonales de rojo.
88

9-
You'll need to get all diagonal `<td>` from the `<table>` and paint them using the code:
9+
Necesitarás obtener todas las `<td>` de la `<table>` y pintarlas usando el código:
1010

1111
```js
12-
// td should be the reference to the table cell
12+
// td debe ser la referencia a la celda de la tabla
1313
td.style.backgroundColor = 'red';
1414
```
1515

16-
The result should be:
16+
El resultado debe ser:
1717

1818
[iframe src="solution" height=180]

0 commit comments

Comments
 (0)