Skip to content

Commit db99538

Browse files
committed
change for README.md
1 parent 487c5e9 commit db99538

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

README.md

+2-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
This is **_my css study document_** with good tricks, new ideas that it is cool!!!
22

3-
## Deep dive into JavaScript event bubbling and caturing.
3+
## [DOM - The Document Object Model](https://github.com/ImTomQ/html-css/tree/develop/document-object-model#document-object-model-dom)
44

5-
If an element and it's parent have an event handler for the same event, which element will work first when triggered?
6-
7-
Let's start with an example:
8-
This handler is assigned to `<div>`, but also runs if click any nested tag like `<em>` or `<code>`:
9-
10-
```
11-
<div onclick="alert('The handler!')">
12-
<em>If you click on <code>EM</code>, the handler on <code>DIV</code> runs.</em>
13-
</div>
14-
```
15-
16-
### Reference
17-
18-
- https://blog.logrocket.com/deep-dive-into-event-bubbling-and-capturing/
5+
### [Event bubbling and capturing](https://github.com/ImTomQ/html-css/tree/develop/document-object-model/event-bubbling-caturing#deep-dive-into-javascript-event-bubbling-and-caturing)

document-object-model/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ In JavaScript, we can grab an HTML tag by referencing to `id` name:
7171
document.getElementById("id name goes here")
7272
```
7373

74-
This code tells the computer to get `p` element with id of `para1` and print element to the console
74+
This code tells the computer to get `<p />` element with id of `para1` and print element to the console
7575

7676
```
7777
const paragraph1 = document.getElementById("para1");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Deep dive into JavaScript event bubbling and caturing.
2+
3+
If an element and it's parent have an event handler for the same event, which element will work first when triggered?
4+
5+
Let's start with an example:
6+
This handler is assigned to `<div>`, but also runs if click any nested tag like `<em>` or `<code>`:
7+
8+
```
9+
<div onclick="alert('The handler!')">
10+
<em>If you click on <code>EM</code>, the handler on <code>DIV</code> runs.</em>
11+
</div>
12+
```
13+
14+
### Reference
15+
16+
- https://blog.logrocket.com/deep-dive-into-event-bubbling-and-capturing/

0 commit comments

Comments
 (0)