Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

setinterval javascript

loadingProgress(max, jump, speed) {
  const loadBar = setInterval(() => {
    if(this.load_current < max){
      this.load_current += jump || 1;
    } else {
      clearInterval(loadBar);
      this.onOk()
      if(this.isFrom == 'isReject') {
        this.$emit('loadRejectErros');
      }
    }
  }, speed);
},
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #setinterval #javascript
ADD COMMENT
Topic
Name
7+5 =