Skip to content

Instantly share code, notes, and snippets.

@oak-tree
Created February 18, 2014 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oak-tree/9070870 to your computer and use it in GitHub Desktop.
Save oak-tree/9070870 to your computer and use it in GitHub Desktop.
booolView.render().$el.find('img').one('load', function(event) {
/* make sure to cancel timeout first */
model.trigger('boool:load-event');
self.collection.trigger('boool:load-event');
console.log('loaded');
}).one('error', function(event) {
console.log('error loading the img');
/*
* call it to make sure our numbers of fetching and loading
* will be equaly
*/
self.collection.trigger('boool:load-event');
booolView.remove();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment