回答編集履歴
2
追記
test
CHANGED
@@ -24,9 +24,9 @@
|
|
24
24
|
|
25
25
|
$(function(){
|
26
26
|
|
27
|
-
$('html,body').animate({scrollTop:0 }, 0)
|
27
|
+
$('html,body').animate({scrollTop:0 }, 0)
|
28
28
|
|
29
|
-
|
29
|
+
.delay(1000).animate({scrollTop:$(location.hash).offset().top }, 1000, 'swing');
|
30
30
|
|
31
31
|
});
|
32
32
|
|
@@ -45,3 +45,5 @@
|
|
45
45
|
```
|
46
46
|
|
47
47
|
※一部修正
|
48
|
+
|
49
|
+
1秒間表示してから移動することにしました。
|
1
修正
test
CHANGED
@@ -24,11 +24,9 @@
|
|
24
24
|
|
25
25
|
$(function(){
|
26
26
|
|
27
|
-
|
27
|
+
$('html,body').animate({scrollTop:0 }, 0);
|
28
28
|
|
29
|
-
location.hash="";
|
30
|
-
|
31
|
-
$('html,body').animate({scrollTop:$(hash).offset().top }, 500, 'swing');
|
29
|
+
$('html,body').animate({scrollTop:$(location.hash).offset().top }, 500, 'swing');
|
32
30
|
|
33
31
|
});
|
34
32
|
|
@@ -45,3 +43,5 @@
|
|
45
43
|
|
46
44
|
|
47
45
|
```
|
46
|
+
|
47
|
+
※一部修正
|