回答編集履歴

1

誤字の修正

2019/01/27 03:40

投稿

dfher
dfher

スコア17

test CHANGED
@@ -8,6 +8,62 @@
8
8
 
9
9
  ```event.js
10
10
 
11
+ function widthChange(mq){
11
12
 
13
+ if(mq.matches){
14
+
15
+ $('.container').empty();
16
+
17
+ $.ajax({
18
+
19
+ type: 'GET',
20
+
21
+ url: "./data.json",
22
+
23
+ dataType: "json",
24
+
25
+ success: function(data) {
26
+
27
+ pcEventSort(data);
28
+
29
+ },
30
+
31
+ error: function(){
32
+
33
+ console.log("error");
34
+
35
+ }
36
+
37
+ });
38
+
39
+ }else{
40
+
41
+ $('.container').empty();
42
+
43
+ $.ajax({
44
+
45
+ type: 'GET',
46
+
47
+ url: "./data.json",
48
+
49
+ dataType: "json",
50
+
51
+ success: function(data) {
52
+
53
+ spEventSort(data);
54
+
55
+ },
56
+
57
+ error: function(){
58
+
59
+ console.log("error");
60
+
61
+ }
62
+
63
+ });
64
+
65
+ }
66
+
67
+ }
12
68
 
13
69
  ```