-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
63 lines (62 loc) · 1.4 KB
/
index.js
File metadata and controls
63 lines (62 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
(function () {
$(".skills-prog li")
.find(".skills-bar")
.each(function (i) {
$(this)
.find(".bar")
.delay(i * 150)
.animate(
{
width: $(this).parents().attr("data-percent") + "%",
},
1000,
"linear",
function () {
return $(this).css({
"transition-duration": ".5s",
});
}
);
});
$(".skills-soft li")
.find("svg")
.each(function (i) {
var c, cbar, circle, percent, r;
circle = $(this).children(".cbar");
r = circle.attr("r");
c = Math.PI * (r * 2);
percent = $(this).parent().data("percent");
cbar = ((100 - percent) / 100) * c;
circle.css({
"stroke-dashoffset": c,
"stroke-dasharray": c,
});
circle.delay(i * 150).animate(
{
strokeDashoffset: cbar,
},
1000,
"linear",
function () {
return circle.css({
"transition-duration": ".3s",
});
}
);
$(this)
.siblings("small")
.prop("Counter", 0)
.delay(i * 150)
.animate(
{
Counter: percent,
},
{
duration: 1000,
step: function (now) {
return $(this).text(Math.ceil(now) + "%");
},
}
);
});
}.call(this));