javascript - model.fetch({success: function() }); taking long time to get the server response and getting delayed to load -
i'm writing model.fetch success function , taking time json response , delayed in loading. when debugging every time looping until success , again after in next iteration looping inside function
my code follow:
    functionone: function (evt) {         if (this.model.get('code') !== code) {             // need handle selected type             this.model.set('code', id);             this.model.fetch({                 success: function () {                     this.functiontwo();                 }             });         }     },     functiontwo: function () {          this.ui.list.trigger('change');          // if required reset single list          this.initialize(this.options);         this.method();     }       
 
  
Comments
Post a Comment