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.