回答編集履歴
4
追記しました。
test
CHANGED
@@ -39,3 +39,57 @@
|
|
39
39
|
}, 2000);
|
40
40
|
|
41
41
|
```
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
---
|
46
|
+
|
47
|
+
追記:
|
48
|
+
|
49
|
+
jQueryを使っているなら、以下のようなつくりでいかがでしょうか?
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
```JS
|
54
|
+
|
55
|
+
new Vivus(
|
56
|
+
|
57
|
+
"title-path",
|
58
|
+
|
59
|
+
{
|
60
|
+
|
61
|
+
type: "scenario-sync",
|
62
|
+
|
63
|
+
duration: 20,
|
64
|
+
|
65
|
+
forceRender: false,
|
66
|
+
|
67
|
+
animTimingFunction: Vivus.EASE
|
68
|
+
|
69
|
+
},
|
70
|
+
|
71
|
+
function () {
|
72
|
+
|
73
|
+
// 色は共通なので1箇所で指定。できればCSSに記述。
|
74
|
+
|
75
|
+
$("path").css({
|
76
|
+
|
77
|
+
fill: "white"
|
78
|
+
|
79
|
+
});
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
// 変化があるopacityだけ、jQueryのanimate()で変化させる
|
84
|
+
|
85
|
+
$("path").animate({
|
86
|
+
|
87
|
+
opacity: 1
|
88
|
+
|
89
|
+
}, 2000);
|
90
|
+
|
91
|
+
}
|
92
|
+
|
93
|
+
);
|
94
|
+
|
95
|
+
```
|
3
修正
test
CHANGED
@@ -17,3 +17,25 @@
|
|
17
17
|
|
18
18
|
|
19
19
|
ただ「実験的な機能」ではあるようです。
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
---
|
24
|
+
|
25
|
+
追記:
|
26
|
+
|
27
|
+
「getElementsByTagName」で取得しているため、以下のように記述する必要があるのではないかと思います。
|
28
|
+
|
29
|
+
```JS
|
30
|
+
|
31
|
+
// 配列「element[0]」などで取得
|
32
|
+
|
33
|
+
element[0].animate({
|
34
|
+
|
35
|
+
opacity: [ 0, 1 ],
|
36
|
+
|
37
|
+
color: [ "#fff", "#fff" ]
|
38
|
+
|
39
|
+
}, 2000);
|
40
|
+
|
41
|
+
```
|
2
修正
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
~~参考URL: ~~
|
6
6
|
|
7
|
-
|
7
|
+
~~http://semooh.jp/jquery/api/effects/animate/params,+[duration],+[easing],+[callback]/~~
|
8
8
|
|
9
9
|
|
10
10
|
|
1
訂正
test
CHANGED
@@ -1,7 +1,19 @@
|
|
1
|
-
animate()はjQueryの関数ではないですか? 調べてみたほうがよさそうに思えます。
|
1
|
+
~~animate()はjQueryの関数ではないですか? 調べてみたほうがよさそうに思えます。~~
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
参考URL:
|
5
|
+
~~参考URL: ~~
|
6
6
|
|
7
|
-
[http://semooh.jp/jquery/api/effects/animate/params,+[duration],+[easing],+[callback]/](http://semooh.jp/jquery/api/effects/animate/params,+[duration],+[easing],+[callback]/)
|
7
|
+
[http://semooh.jp/jquery/api/effects/animate/params,+[duration],+[easing],+[callback]/](~~http://semooh.jp/jquery/api/effects/animate/params,+[duration],+[easing],+[callback]/~~)
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
---
|
12
|
+
|
13
|
+
すみません、JavaScriptの仕様としてあるようですね..
|
14
|
+
|
15
|
+
[https://developer.mozilla.org/ja/docs/Web/API/Element/animate](https://developer.mozilla.org/ja/docs/Web/API/Element/animate)
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
ただ「実験的な機能」ではあるようです。
|