Finn Rudolph's ImageFlow.js is a wicked clever library.
This may be a general JavaScript question inasmuch as I have an oncontextmenu event that (amo开发者_JAVA百科ng other things) removes an instance of ImageFlow and creates a new one with a different set of images on rightClick or commandClick.
My problem is that once the original instance starts loading images, it continues until it's done, even if the dom structure created for it is removed. This means my new instance can't start loading until the old one finishes. Does anybody know of a way to abort the image loading?
found this answer and it worked for me.
A solution this simple and broad is either:
- Something I should have known about all along, or
- An incipient bug that's now just waiting to bite me.
精彩评论