function updateProgress() {
  var progressBar = document.querySelector('.progress-bar');

  if (progressBar !== null) {
    var numSlides = document.getElementsByClassName('slide').length;
    var position = currentPosition() - 1;
    var percent = (numSlides === 1) ? 100 : 100 * position / (numSlides - 1);
    progressBar.style.width = percent.toString() + '%';
  }
}
function updateProgress() {
  var progressBar = document.querySelector('.progress-bar');

  if (progressBar !== null) {
    var numSlides = document.getElementsByClassName('slide').length;
    var position = currentPosition() - 1;
    var percent = (numSlides === 1) ? 100 : 100 * position / (numSlides - 1);
    progressBar.style.width = percent.toString() + '%';
  }
}
function updateProgress ( ) { var progressBar = document . querySelector ( '.progress-bar' ) ; if ( progressBar !== null ) { var numSlides = document . getElementsByClassName ( 'slide' ) . length ; var position = currentPosition ( ) - 1 ; var percent = ( numSlides === 1 ) ? 100 : 100 * position / ( numSlides - 1 ) ; progressBar . style . width = percent . toString ( ) + '%' ; } }
Sets the progress indicator.
Sets the progress indicator .