質問編集履歴
1
ソースコードを修正しました!
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
解決させたいことは、window.matchMediaの条件分岐で、else ifやelseの時に、ページを一度リロードさせたいです。
|
2
2
|
単純に、 location.reload();だけいれると、無限ループします。
|
3
3
|
|
4
|
-
|
4
|
+
ソースコードを修正しました。
|
5
5
|
|
6
|
-
ご教授いただけますでしょうか。
|
7
|
-
|
8
|
-
|
9
6
|
```ここに言語を入力
|
7
|
+
|
10
8
|
if (window.matchMedia('screen and (max-width:767px)').matches) {
|
11
9
|
|
12
10
|
|
@@ -21,6 +19,21 @@
|
|
21
19
|
$('#faq-ttl-tab2-3').prependTo('#faq-cont-tab2-3');
|
22
20
|
$('#faq-ttl-tab2-4').prependTo('#faq-cont-tab2-4');
|
23
21
|
$('#faq-ttl-tab2-5').prependTo('#faq-cont-tab2-5');
|
22
|
+
$('#faq-ttl-tab2-6').prependTo('#faq-cont-tab2-6');
|
23
|
+
$('#faq-ttl-tab2-7').prependTo('#faq-cont-tab2-7');
|
24
|
+
$('#faq-ttl-tab2-8').prependTo('#faq-cont-tab2-8');
|
25
|
+
$('#faq-ttl-tab2-9').prependTo('#faq-cont-tab2-9');
|
26
|
+
$('#faq-ttl-tab2-10').prependTo('#faq-cont-tab2-10');
|
27
|
+
$('#faq-ttl-tab2-11').prependTo('#faq-cont-tab2-11');
|
28
|
+
$('#faq-ttl-tab2-12').prependTo('#faq-cont-tab2-12');
|
29
|
+
$('#faq-ttl-tab2-13').prependTo('#faq-cont-tab2-13');
|
30
|
+
$('#faq-ttl-tab2-14').prependTo('#faq-cont-tab2-14');
|
31
|
+
$('#faq-ttl-tab2-15').prependTo('#faq-cont-tab2-15');
|
32
|
+
$('#faq-ttl-tab2-16').prependTo('#faq-cont-tab2-16');
|
33
|
+
$('#faq-ttl-tab2-17').prependTo('#faq-cont-tab2-17');
|
34
|
+
$('#faq-ttl-tab2-18').prependTo('#faq-cont-tab2-18');
|
35
|
+
$('#faq-ttl-tab2-19').prependTo('#faq-cont-tab2-19');
|
36
|
+
$('#faq-ttl-tab2-20').prependTo('#faq-cont-tab2-20');
|
24
37
|
|
25
38
|
$('#faq-ttl-tab3-1').prependTo('#faq-cont-tab3-1');
|
26
39
|
$('#faq-ttl-tab3-2').prependTo('#faq-cont-tab3-2');
|
@@ -28,8 +41,8 @@
|
|
28
41
|
$('#faq-ttl-tab3-4').prependTo('#faq-cont-tab3-4');
|
29
42
|
$('#faq-ttl-tab3-5').prependTo('#faq-cont-tab3-5');
|
30
43
|
$('#faq-ttl-tab3-6').prependTo('#faq-cont-tab3-6');
|
44
|
+
$('#faq-ttl-tab4-1').prependTo('#faq-cont-tab4-1');
|
31
45
|
|
32
|
-
$('#faq-ttl-tab4-1').prependTo('#faq-cont-tab4-1');
|
33
46
|
$('#faq-ttl-tab4-2').prependTo('#faq-cont-tab4-2');
|
34
47
|
$('#faq-ttl-tab4-3').prependTo('#faq-cont-tab4-3');
|
35
48
|
$('#faq-ttl-tab4-4').prependTo('#faq-cont-tab4-4');
|
@@ -54,8 +67,13 @@
|
|
54
67
|
|
55
68
|
$('#mamexshops-ttl-tab6-1').prependTo('#mamexshops-cont-tab6-1');
|
56
69
|
|
70
|
+
$('#mamexshops-ttl-tab7-1').prependTo('#mamexshops-cont-tab7-1');
|
57
71
|
|
72
|
+
$('#mamexshops-ttl-tab8-1').prependTo('#mamexshops-cont-tab8-1');
|
58
73
|
|
74
|
+
$('#mamexshops-ttl-tab9-1').prependTo('#mamexshops-cont-tab9-1');
|
75
|
+
|
76
|
+
|
59
77
|
});
|
60
78
|
|
61
79
|
$(window).on('load', function() {
|
@@ -70,7 +88,7 @@
|
|
70
88
|
});
|
71
89
|
|
72
90
|
|
73
|
-
} else if (window.matchMedia('screen and (min-width:
|
91
|
+
} else if (window.matchMedia('screen and (min-width:768px)').matches) {
|
74
92
|
|
75
93
|
// pc 親
|
76
94
|
$(window).on('load', function() { //クリックしたときのファンクションをまとめて指定
|
@@ -93,7 +111,34 @@
|
|
93
111
|
|
94
112
|
|
95
113
|
} else {
|
96
|
-
|
114
|
+
|
97
115
|
}
|
116
|
+
```
|
98
117
|
|
118
|
+
```ここに言語を入力
|
119
|
+
|
120
|
+
if (!navigator.userAgent.match(/(iPhone|Android|iPad)/)) {
|
121
|
+
|
122
|
+
var i = 0;
|
123
|
+
function checkWidth() {
|
124
|
+
var windowsize = $(window).width();
|
125
|
+
|
126
|
+
if (windowsize > 768 && i==0){
|
127
|
+
i = 1;
|
128
|
+
}
|
129
|
+
else if (windowsize <= 768 && i==1) {
|
130
|
+
location.reload();
|
131
|
+
i = 0;
|
132
|
+
}
|
133
|
+
}
|
134
|
+
// Execute on load
|
135
|
+
checkWidth();
|
136
|
+
// Bind event listener
|
137
|
+
$(window).resize(checkWidth);
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
}
|
99
144
|
```
|