File tree Expand file tree Collapse file tree 6 files changed +128
-128
lines changed
2-ui/1-document/03-dom-navigation
3-navigation-links-which-null Expand file tree Collapse file tree 6 files changed +128
-128
lines changed Original file line number Diff line number Diff line change 1
- There are many ways, for instance :
1
+ Hay muchas maneras, por ejemplo :
2
2
3
3
4
- The ` <div> ` DOM node :
4
+ El nodo ` <div> ` del DOM :
5
5
6
6
``` js
7
7
document .body .firstElementChild
8
- // or
8
+ // o
9
9
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 )
11
11
document .body .childNodes [1 ]
12
12
```
13
13
14
- The ` <ul> ` DOM node :
14
+ El nodo ` <ul> ` del DOM :
15
15
16
16
``` js
17
17
document .body .lastElementChild
18
- // or
18
+ // o
19
19
document .body .children [1 ]
20
20
```
21
21
22
- The second ` <li> ` (with Pete):
22
+ El segundo ` <li> ` (con Pete):
23
23
24
24
``` js
25
- // get <ul>, and then get its last element child
25
+ // obtener <ul>, y luego obtener su último elemento hijo
26
26
document .body .lastElementChild .lastElementChild
27
27
```
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ importance: 5
4
4
5
5
# DOM children
6
6
7
- Look at this page :
7
+ Mira esta página :
8
8
9
9
``` html
10
10
<html >
@@ -18,7 +18,7 @@ Look at this page:
18
18
</html >
19
19
```
20
20
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)?
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ importance: 5
2
2
3
3
---
4
4
5
- # The sibling question
5
+ # La pregunta de los hermanos
6
6
7
- If ` elem ` -- is an arbitrary DOM element node ...
7
+ Si ` elem ` -- es un elemento nodo arbitrario del DOM ...
8
8
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 ` ?
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -2,17 +2,17 @@ importance: 5
2
2
3
3
---
4
4
5
- # Select all diagonal cells
5
+ # Seleccionar todas las celdas diagonales
6
6
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 .
8
8
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 :
10
10
11
11
``` js
12
- // td should be the reference to the table cell
12
+ // td debe ser la referencia a la celda de la tabla
13
13
td .style .backgroundColor = ' red' ;
14
14
```
15
15
16
- The result should be :
16
+ El resultado debe ser :
17
17
18
18
[ iframe src="solution" height=180]
You can’t perform that action at this time.
0 commit comments