-
AuthorPosts
-
February 9, 2016 at 10:58 pm #580632
Hello, is it possible to slow down the counting speed of the animated numbers?
Because on my page: http://www.ericsmeets.nl/testserver/over-de-school/#aanbod I have some small numbers like 4, 7 and 8.
But the animation is hardly visible, hence the question.Thanks!
February 9, 2016 at 11:34 pm #580644Hey EricSmeets!
Thank you for using Enfold.
You can edit js > shortcodes.js, find this code on line 2688:
var number_container = $(this), elements = number_container.find('.avia-single-number'), countTimer = number_container.data('timer') || 3000;
let us know if that works out for you
Best regards,
BasilisFebruary 10, 2016 at 1:19 am #580703I tried editing this, but there was no difference in the speed with small numbers < 10.
There was a difference if I tried to make a number 500 for example. But I won’t have such high numbers.
Any idea?- This reply was modified 8 years, 9 months ago by EricSmeets.
February 12, 2016 at 2:02 am #581967Is there something I done wrong?
February 15, 2016 at 8:39 am #583189Hi!
If you input the number 100 or any number less than that, the animated number will start from 000 and it will increment by 1 so it will go like 001 to 002 to 003 and so on and so forth until it reach the number 100. Unfortunately, it’s not possible to control the speed of the requestAnimationFrame function which is responsible for the animation without creating a custom script. You might want to consult a freelance developer: http://kriesi.at/contact/customization
Regards,
IsmaelApril 3, 2019 at 7:26 am #1086393Hi there,
it seems as since 2016 the script has moved to
enfold/config-templatebuilder/avia-shortcodes/numbers/numbers.jsWhereas, an adaption of the code still does not work.
I tried to change the number from
var number_container = $(this), elements = number_container.find(‘.__av-single-number’), countTimer = number_container.data(‘timer’) || 3000;
to
var number_container = $(this), elements = number_container.find(‘.__av-single-number’), countTimer = number_container.data(‘timer’) || 15000;But the speed of the numbers doesn’t get any slower.
Greets,
Alex- This reply was modified 5 years, 7 months ago by pixellovers.
April 7, 2019 at 1:36 am #1087870Hi,
Sorry for the late reply, unfortunately for small numbers changing the “3000” will not slow the count down, it is designed for larger numbers with more than two places.
This is what the last reply in this thread was trying to say:Unfortunately, it’s not possible to control the speed of the requestAnimationFrame function which is responsible for the animation without creating a custom script. You might want to consult a freelance developer: http://kriesi.at/contact/customization
Also here: https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
The number of callbacks is usually 60 times per second, but will generally match the display refresh rate in most web browsers as per W3C recommendation.
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.