lucaong / jQCloud

jQuery plugin for drawing neat word clouds that actually look like clouds
MIT License
646 stars 293 forks source link

Added a destroy method. #43

Open lightswitch05 opened 10 years ago

lightswitch05 commented 10 years ago

I needed a way to stop a word cloud mid-render. In order to accomplish this, it has to keep track of the timeout IDs. Even more, the jQCloud object needed to persistant.

Destroy method keeps tracks of all unfired timeouts and clears them. It also clears any words in the word cloud and their attached event listeners. Finally it removes the jqcloud class.