You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Lesson 6 – reusability / only once](#lesson-6--reusability--only-once)
23
+
-[Lesson 7 – making a jQuery plugin](#lesson-7--making-a-jquery-plugin)
30
24
31
25
## Preflight
32
26
@@ -103,7 +97,11 @@ Unfortunately `let` is not supported in IE so far. To read more about the differ
103
97
104
98
If you need to support IE, it is probably safe to replace `let` with `var`. <small>And cope with the unexpected 😈</small>
105
99
106
-
## Lesson 1 – attaching the event handlers
100
+
## Chapter one – basics
101
+
102
+
In this chapter we well learn the basics of jQuery selectors and event handlers.
103
+
104
+
### Lesson 1 – attaching the event handlers
107
105
108
106
Comes in handy
109
107
-[Preflight / functions and arrow functions](#functions-and-arrow-functions)
@@ -122,14 +120,14 @@ The solution is possible without doing that.
122
120
An explanation is attached to each solution.
123
121
In this tutorial the solutions are ranked. Although all solutions will work, the first solution is the "worst" and the last solution is the "best". This has been done to provide the approach to the solution. Further lessons will base on the third solution.
124
122
125
-
### Get to the code
123
+
####Get to the code
126
124
127
125
-[Task – attaching the event handlers](https://codepen.io/mulithemuli/pen/JjPREzX)
The buttons are useful but not necessarily relevant to every user. We would like to hide (but not remove) the buttons and delegate the change of an input to the click of the button.
164
162
@@ -168,12 +166,12 @@ Covered in this lesson
168
166
169
167
When JavaScript is active we would like to remove the button from the view but trigger its click action when the input has been changed.
170
168
171
-
### Get to the code
169
+
####Get to the code
172
170
173
171
-[Task – removing the buttons](https://codepen.io/mulithemuli/pen/VwZKWOp) (same as the solution from lesson 3)
-[Preflight / functions and arrow functions](#functions-and-arrow-functions)
@@ -185,31 +183,31 @@ Covered in this lesson
185
183
- event delegation
186
184
- jQuery [`.each()`](https://api.jquery.com/each/) function
187
185
188
-
### Get to the code
186
+
####Get to the code
189
187
190
188
- Task – reusability / marker class
191
189
- Solution
192
190
193
-
## Lesson 6 – reusability / only once
191
+
###Lesson 6 – reusability / only once
194
192
195
193
We can now select specific sections of the page to be handled as we like. But what if the DOM gets updated by an event like an AJAX call? The new DOM should get the same event handling as the other parts but the existing parts should not get the same events attached twice.
196
194
197
195
Covered in this lesson
198
196
- remember marker classes
199
197
200
-
### Get to the code
198
+
####Get to the code
201
199
202
200
- Task – reusability / only once
203
201
- Solution
204
202
205
-
## Lesson 7 – making a jQuery plugin
203
+
###Lesson 7 – making a jQuery plugin
206
204
207
205
It is a solution which can be used by more than just us? To make it more convenient for the users we would like to create a jQuery plugin which does all this covered before.
0 commit comments