Skip to content

Commit 15f7acf

Browse files
committed
minor fixes
1 parent 9fcffe1 commit 15f7acf

File tree

15 files changed

+17
-17
lines changed

15 files changed

+17
-17
lines changed

1-js/02-first-steps/01-hello-world/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Script files are attached to HTML with the `src` attribute:
7373
<script src="/path/to/script.js"></script>
7474
```
7575

76-
Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="script.js"` would mean a file `"script.js"` in the current folder.
76+
Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="script.js"`, just like `src="./script.js"`, would mean a file `"script.js"` in the current folder.
7777

7878
We can give a full URL as well. For instance:
7979

1-js/11-async/02-promise-basics/03-animate-circle-promise/solution.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
text-align: center;
1111
}
1212
.circle {
13-
transition-property: width, height, margin-left, margin-top;
13+
transition-property: width, height;
1414
transition-duration: 2s;
1515
position: fixed;
1616
transform: translateX(-50%) translateY(-50%);

2-ui/2-events/01-introduction-browser-events/07-carousel/solution.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div id="carousel" class="carousel">
1111
<button class="arrow prev"></button>
1212
<div class="gallery">
13-
<ul class="images">
13+
<ul>
1414
<li><img src="https://en.js.cx/carousel/1.png"></li>
1515
<li><img src="https://en.js.cx/carousel/2.png"></li>
1616
<li><img src="https://en.js.cx/carousel/3.png"></li>

2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/2-hoverintent/solution.view/hoverIntent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class HoverIntent {
8888
if (speed < this.sensitivity) {
8989
clearInterval(this.checkSpeedInterval);
9090
this.isHover = true;
91-
this.over.call(this.elem, event);
91+
this.over.call(this.elem);
9292
} else {
9393
// speed fast, remember new coordinates as the previous ones
9494
this.prevX = this.lastX;

4-binary/01-arraybuffer-binary-arrays/article.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ new TypedArray();
126126

127127
We can create a `TypedArray` directly, without mentioning `ArrayBuffer`. But a view cannot exist without an underlying `ArrayBuffer`, so gets created automatically in all these cases except the first one (when provided).
128128

129-
To access the `ArrayBuffer`, there are properties:
130-
- `arr.buffer` -- references the `ArrayBuffer`.
131-
- `arr.byteLength` -- the length of the `ArrayBuffer`.
129+
To access the underlying `ArrayBuffer`, there are following properties in `TypedArray`:
130+
- `buffer` -- references the `ArrayBuffer`.
131+
- `byteLength` -- the length of the `ArrayBuffer`.
132132

133133
So, we can always move from one view to another:
134134
```js

7-animation/2-css-animations/3-animate-circle/solution.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="utf-8">
66
<style>
77
.circle {
8-
transition-property: width, height, margin-left, margin-top;
8+
transition-property: width, height;
99
transition-duration: 2s;
1010
position: fixed;
1111
transform: translateX(-50%) translateY(-50%);

7-animation/2-css-animations/3-animate-circle/source.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="utf-8">
66
<style>
77
.circle {
8-
transition-property: width, height, margin-left, margin-top;
8+
transition-property: width, height;
99
transition-duration: 2s;
1010
position: fixed;
1111
transform: translateX(-50%) translateY(-50%);

7-animation/2-css-animations/4-animate-circle-callback/solution.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
text-align: center;
1111
}
1212
.circle {
13-
transition-property: width, height, margin-left, margin-top;
13+
transition-property: width, height;
1414
transition-duration: 2s;
1515
position: fixed;
1616
transform: translateX(-50%) translateY(-50%);

7-animation/3-js-animation/1-animate-ball/solution.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222

2323
function bounce(timeFraction) {
24-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
24+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
2525
if (timeFraction >= (7 - 4 * a) / 11) {
2626
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
2727
}

7-animation/3-js-animation/2-animate-ball-hops/solution.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222

2323
function bounce(timeFraction) {
24-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
24+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
2525
if (timeFraction >= (7 - 4 * a) / 11) {
2626
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
2727
}

7-animation/3-js-animation/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ The `bounce` function does the same, but in the reverse order: "bouncing" starts
283283

284284
```js
285285
function bounce(timeFraction) {
286-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
286+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
287287
if (timeFraction >= (7 - 4 * a) / 11) {
288288
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
289289
}

7-animation/3-js-animation/bounce-easeinout.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
function bounce(timeFraction) {
29-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
29+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
3030
if (timeFraction >= (7 - 4 * a) / 11) {
3131
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
3232
}

7-animation/3-js-animation/bounce-easeout.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323

2424
function bounce(timeFraction) {
25-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
25+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
2626
if (timeFraction >= (7 - 4 * a) / 11) {
2727
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
2828
}

7-animation/3-js-animation/bounce.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
animate({
2020
duration: 3000,
2121
timing: function bounce(timeFraction) {
22-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
22+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
2323
if (timeFraction >= (7 - 4 * a) / 11) {
2424
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
2525
}

7-animation/3-js-animation/text.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737

3838
function bounce(timeFraction) {
39-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
39+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
4040
if (timeFraction >= (7 - 4 * a) / 11) {
4141
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
4242
}

0 commit comments

Comments
 (0)