');
}
$('#logo').after('');
$('#logo').after('');
(function($) {
$.fn.countTo = function(options) {
// merge the default plugin settings with the custom options
options = $.extend({}, $.fn.countTo.defaults, options || {});
// how many times to update the value, and how much to increment the value on each update
var loops = Math.ceil(options.speed / options.refreshInterval);
//increment = (options.to - options.from) / loops;
//var increment = incrementVal[Math.floor(Math.random() * incrementVal.length)];
//console.log('increment = '+increment);
return $(this).each(function() {
var _this = this,
loopCount = 0,
value = options.from,
interval = setInterval(updateTimer, options.refreshInterval);
function updateTimer() {
// random increment from array value
value += options.incrementVal[Math.floor(Math.random() * options.incrementVal.length)];
loopCount++;
$(_this).html(value.toFixed(options.decimals));
if (typeof(options.onUpdate) == 'function') {
options.onUpdate.call(_this, value);
}
if (loopCount >= loops || value >= options.to) {
clearInterval(interval);
value = options.to;
if (typeof(options.onComplete) == 'function') {
options.onComplete.call(_this, value);
}
}
}
});
};
$.fn.countTo.defaults = {
from: 0, // the number the element should start at
to: 100, // the number the element should end at
incrementVal: [50, 75, 100, 200, 500],
speed: 1000, // how long it should take to count between the target numbers
refreshInterval: 4500, // how often the element should be updated
decimals: 0, // the number of decimal places to show
onUpdate: null, // callback method for every time the element is updated,
onComplete: null, // callback method for when the element finishes updating
};
})(jQuery);
jQuery(function($) {
$('#widget_progress_bar .collected_amount').countTo({
from: startCounter,
to: collected,
incrementVal: [50, 75, 100, 200, 500],
speed: 60000,
refreshInterval: 1000,
onComplete: function(value) {
console.debug(this);
}
});
});
/* donations counter END*/
/* help */
$('#footer').prepend('\
\
');
$('#footer .help').click(function(){
if( context_lang == 'fr_FR'){
Swal.fire({
title: 'Notre service donateurs à votre disposition',
text: 'Pour toute demande ou information, n’hésitez pas à contacter notre équipe par email à donateurs@fdf.org ou par téléphone au 01.44.21.87.00.'
})
}
if( context_lang == 'en_EN'){
Swal.fire({
title: 'Our donor service at your disposal',
text: 'For any request or information, do not hesitate to contact our team by email at donateurs@fdf.org or by phone at 01.44.21.87.00.'
})
}
})
/* help END*/
/* socials share
$('#form-info').append('