Skip to content

Instantly share code, notes, and snippets.

@infacq
Created October 22, 2013 03:00
Show Gist options
  • Save infacq/7094560 to your computer and use it in GitHub Desktop.
Save infacq/7094560 to your computer and use it in GitHub Desktop.
1) setup pemboleh ubah lokal yang ditugas kepada fungsi _.after 2) panggil pemboleh ubah tadi ke dalam gelung _.each selepas pelaksanaan _.each telah lengkap, maka _.after akan berjalan seperti patutnya
var renderPoin = _.after(data.models.length, function() {
// lakukan sesuatu disini
});
_.each(data.models, function (poin, i) {
renderPoin();
}, self);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment