Moesia facts widget bug


#1

Under the “Nemzetközi kapcsolataink” title on my 1-pager website, there are some numbers. They are changing almost after every time I refresh the page, but I don’t know the reason. Of course, I would like to show fix numbers lik 6300, etc. Here is a link to my website: http://lazarusgroup.hu/


#2

Hello there,

Try to use some lower value for duration like it is explained in this topic https://athemes.com/forums/topic/facts-numbers/

All the Best!


#3

It doesn’t solve my problems: the uration is already 1000, but I still have the problem. Should I change the duration to 500?


#4

Hello again,

I see, obviously this is not working with very large numbers. Leave duration on 100, but try to add callback function complete. It will ensure that specified value is always returned. Code should be changed like this:

//Waypoints
jQuery(function($) {
	$('.fact').waypoint(function(down) {
		$('.fact').each(function () {
			var $this = $(this);
			$({ Counter: 0 }).animate({ Counter: $this.attr('id') }, {
				duration: 1000,
				easing: 'swing',
				step: function () {
				    $this.text(Math.ceil(this.Counter));
				},
			    complete: function () {
			      $this.text(Math.ceil(this.Counter));
			    }
			});
		});
	},

Here, check screenshot in order to see what part is added http://screencast.com/t/cc583wAYdy

I have tried several times, and it worked every time.

Let us know if it is working now.
All the Best!