RobertFischer / JQuery-PeriodicalUpdater

A port of Prototype's PeriodicalUpdater to JQuery
282 stars 50 forks source link

Is there a callback for autostop? #7

Closed kineticac closed 13 years ago

kineticac commented 13 years ago

When we autostop, is there a callback?

drupol commented 13 years ago

Yes there's one, check line 139.

The property is: autoStopCallback

Example:

$.PeriodicalUpdater(url, {
  type: 'GET',
  minTimeout: 500,
  maxTimeout: 60*1000,
  multiplier: 1,
  cache:false,
  autoStopCallback: function() {
    alert("I'm done, bye.");
  }
},
function(getdata, success, xhr, handle) {
  });
});