That's why I pointed to a similar library so that you can take a peek at the source code and try to modify it according to your needs. Maybe looking at some other full fledged Javascript libraries like Prototype etc. (or their source code if libraries are not allowed) will help you.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
Offline 8,871 posts
since Jun 2006