Skip to content

Progress bar #41

@Jack94son

Description

@Jack94son

Hi, thanks for implementing this awesome plugin!
Would like to ask what if I want to add in the progress bar for the carousel?

Which callback function should I place the startProgressBar() and resetProgressBar()?

I tried to play around, but no luck for me.

onRendered: function( slider ) {
      var $totalSlide = slider.items.length;
      var item = slider.nearestIndex() + 1;

      $('.cmr-slider-counter > .current-counter').html(item);
      $('.cmr-slider-counter > .total-counter').html($totalSlide);

      startProgressBar(slider.autoPlayDelay);
  },
  onAnimateFinished: function( slider ) {
      resetProgressBar();
  }

this only worked once the carousel loaded.
when the item changed, the progress bar not working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions