Counter Animation Speed

Hi,

I had a question about the animation speed of the .counter built into Muffin Builder.

Is it possible to slow the number animation speed down?

And where would I find that script for the .counter animation speed?

Thanks,
Bob


Comments

  • Hello Bob,
    There is no way to speed it down with the theme options, it's just a built-in the theme js scripts.
    You would have to edit the theme files to achieve that, unfortunately, we do not provide help with this kind of modifications.

    If you have some further questions, feel free to ask.
    Thanks
  • Ok thanks. I found this in the js files I just wanted to slowdown the duration of the effect but I'm not sure:

    /**
     * Animate Math | Counter, Quick Fact, etc.
     */

    $('.animate-math .number').waypoint({

      offset: '100%',
      triggerOnce: true,
      handler: function() {

        var el = $(this.element).length ? $(this.element) : $(this);
        var duration = Math.floor((Math.random() * 1000) + 1000);
        var to = el.attr('data-to');

        $({
          property: 0
        }).animate({
          property: to
        }, {
          duration: duration,
          easing: 'linear',
          step: function() {
            el.text(Math.floor(this.property));
          },
          complete: function() {
            el.text(this.property);
          }
        });

        if (typeof this.destroy !== 'undefined' && $.isFunction(this.destroy)) {
          this.destroy();
        }



  • Sorry, I'm not able to tell you if it's proper.
    If it works, then it surely will work fine.

    Remember, to use the Child Theme to prevent losing customizations while updating the theme.
    Thanks
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.