ready for staging
This commit is contained in:
parent
72da90a5d4
commit
8506be5194
236 changed files with 16119 additions and 6 deletions
58
public/assets/vendor/jquery-circle-progress/circle.js
vendored
Normal file
58
public/assets/vendor/jquery-circle-progress/circle.js
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
//circle progress bar
|
||||
function animateElements() {
|
||||
$('.progressbar').each(function () {
|
||||
var elementPos = $(this).offset().top;
|
||||
var topOfWindow = $(window).scrollTop();
|
||||
var percent = $(this).find('.circle').attr('data-percent');
|
||||
var percentage = parseInt(percent, 10) / parseInt(100, 10);
|
||||
var animate = $(this).data('animate');
|
||||
if (elementPos < topOfWindow + $(window).height() - 30 && !animate) {
|
||||
$(this).data('animate', true);
|
||||
$(this).find('.circle').circleProgress({
|
||||
startAngle: -Math.PI / 2,
|
||||
value: percent / 100,
|
||||
lineCap:"round",
|
||||
size: 180 ,
|
||||
}).on('circle-animation-progress', function (event, progress, stepValue) {
|
||||
$(this).find('div').text((stepValue*100).toFixed(1) + "%");
|
||||
}).stop();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Show animated elements
|
||||
animateElements();
|
||||
$(window).scroll(animateElements);
|
||||
|
||||
// counter up
|
||||
var a = 0;
|
||||
$(window).scroll(function() {
|
||||
|
||||
var oTop = $('.fables-counter').offset().top - window.innerHeight;
|
||||
if (a == 0 && $(window).scrollTop() > oTop) {
|
||||
$('.fables-counter-value').each(function() {
|
||||
var $this = $(this),
|
||||
countTo = $this.attr('data-count');
|
||||
$({
|
||||
countNum: $this.text()
|
||||
}).animate({
|
||||
countNum: countTo
|
||||
},
|
||||
|
||||
{
|
||||
duration: 4000,
|
||||
easing: 'swing',
|
||||
step: function() {
|
||||
$this.text(Math.floor(this.countNum));
|
||||
},
|
||||
complete: function() {
|
||||
$this.text(this.countNum);
|
||||
//alert('finished');
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
a = 1;
|
||||
}
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue