Created
February 18, 2014 13:22
-
-
Save oak-tree/9070870 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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