質問編集履歴

3

getPositionは必要なかったので削除しました

2020/06/13 08:05

投稿

nanakote_s
nanakote_s

スコア2

test CHANGED
File without changes
test CHANGED
@@ -60,8 +60,6 @@
60
60
 
61
61
  $('.page_02').css('display','block');
62
62
 
63
- getPosition();
64
-
65
63
  }
66
64
 
67
65
  return false;

2

余計なものを削除しました

2020/06/13 08:05

投稿

nanakote_s
nanakote_s

スコア2

test CHANGED
File without changes
test CHANGED
@@ -68,30 +68,6 @@
68
68
 
69
69
  });
70
70
 
71
-
72
-
73
- function getPosition(){
74
-
75
- navigator.geolocation.getCurrentPosition(
76
-
77
- function(position){
78
-
79
- $('.lpWrapper .base .page_02').append('<iframe class="gMap" src="https://www.google.com/maps/d/embed?mid=1SbhZYmvCgSSao3DFifjTJN5WDX_YTzqi&q='+position.coords.latitude+','+position.coords.longitude+'&ll='+position.coords.latitude+','+position.coords.longitude+'&z=15"></iframe>');
80
-
81
- },
82
-
83
- function(error){
84
-
85
- $('.lpWrapper .base .page_02').append('<iframe class="gMap" src="https://www.google.com/maps/d/embed?mid=1SbhZYmvCgSSao3DFifjTJN5WDX_YTzqi"></iframe>');
86
-
87
- }
88
-
89
- );
90
-
91
- $('.loading').css('display','none');
92
-
93
- }
94
-
95
71
  </script>
96
72
 
97
73
  ```

1

getPocitionの定義を追加しました

2020/06/13 08:04

投稿

nanakote_s
nanakote_s

スコア2

test CHANGED
File without changes
test CHANGED
@@ -20,13 +20,11 @@
20
20
 
21
21
  </div>
22
22
 
23
- <base>
24
-
25
23
  <div class="page_01">タブ1の内容</div>
26
24
 
27
25
  <div class="page_02">タブ2の内容</div>
28
26
 
29
- </base>
27
+
30
28
 
31
29
  ```
32
30
 
@@ -35,6 +33,8 @@
35
33
  ```ここに言語を入力
36
34
 
37
35
  <script>
36
+
37
+ (function($){
38
38
 
39
39
  $('.tabs li a').on('click',function(){
40
40
 
@@ -68,6 +68,30 @@
68
68
 
69
69
  });
70
70
 
71
+
72
+
73
+ function getPosition(){
74
+
75
+ navigator.geolocation.getCurrentPosition(
76
+
77
+ function(position){
78
+
79
+ $('.lpWrapper .base .page_02').append('<iframe class="gMap" src="https://www.google.com/maps/d/embed?mid=1SbhZYmvCgSSao3DFifjTJN5WDX_YTzqi&q='+position.coords.latitude+','+position.coords.longitude+'&ll='+position.coords.latitude+','+position.coords.longitude+'&z=15"></iframe>');
80
+
81
+ },
82
+
83
+ function(error){
84
+
85
+ $('.lpWrapper .base .page_02').append('<iframe class="gMap" src="https://www.google.com/maps/d/embed?mid=1SbhZYmvCgSSao3DFifjTJN5WDX_YTzqi"></iframe>');
86
+
87
+ }
88
+
89
+ );
90
+
91
+ $('.loading').css('display','none');
92
+
93
+ }
94
+
71
95
  </script>
72
96
 
73
97
  ```