回答編集履歴
2
追記
answer
CHANGED
@@ -24,4 +24,29 @@
|
|
24
24
|
```
|
25
25
|
|
26
26
|
こうなった。
|
27
|
-

|
27
|
+

|
28
|
+
|
29
|
+
---
|
30
|
+
|
31
|
+
```html
|
32
|
+
<!DOCTYPE HTML>
|
33
|
+
<html lang="ja-JP">
|
34
|
+
<head>
|
35
|
+
<meta charset="UTF-8">
|
36
|
+
<title></title>
|
37
|
+
</head>
|
38
|
+
<body>
|
39
|
+
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
|
40
|
+
<script type="text/javascript">
|
41
|
+
$(window).on('load resize', function (e) {
|
42
|
+
console.log(e.type);
|
43
|
+
console.log(e.target);
|
44
|
+
});
|
45
|
+
</script>
|
46
|
+
</body>
|
47
|
+
</html>
|
48
|
+
```
|
49
|
+
|
50
|
+
のとき
|
51
|
+
|
52
|
+

|
1
追記
answer
CHANGED
@@ -1,1 +1,27 @@
|
|
1
|
-
load されるのは window じゃなくて、 documentだからではないでしょうか?
|
1
|
+
load されるのは window じゃなくて、 documentだからではないでしょうか?
|
2
|
+
|
3
|
+
---
|
4
|
+
|
5
|
+
と推測したけど…
|
6
|
+
|
7
|
+
```html
|
8
|
+
<!DOCTYPE HTML>
|
9
|
+
<html lang="ja-JP">
|
10
|
+
<head>
|
11
|
+
<meta charset="UTF-8">
|
12
|
+
<title></title>
|
13
|
+
</head>
|
14
|
+
<body>
|
15
|
+
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
|
16
|
+
<script type="text/javascript">
|
17
|
+
$(window).on('resize load', function (e) {
|
18
|
+
console.log(e.type);
|
19
|
+
console.log(e.target);
|
20
|
+
}).trigger('resize');
|
21
|
+
</script>
|
22
|
+
</body>
|
23
|
+
</html>
|
24
|
+
```
|
25
|
+
|
26
|
+
こうなった。
|
27
|
+

|