Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use jQuery Widget Factory #17
Instead of having functions and global variables that are unique to each instance of this plugin it may be better to have one JS package of code to handle everything. Thankfully there's a great framework to do this call the jQuery Widget Factory It's what all the jQuery UI widgets are built on.
If you've never used it before it can be a bit intimidating. This site should help get you started.