I like this idea. It would take some considerable time playing with this for me to know for sure about possibility.
In the meantime... a couple questions...
First of all - have you added the library to the proper folder post-production and also updated the index.html file post-production to point to that library? At this point you may wish to upload to a server and test.
It is possible to do some other work on that aspect of things but that is another thread.
Secondly, have you tried building a working html file that works on its own and then placing it on the Captivate stage as an HTML5 Animation?
This second method presents it's own set of challenges as it becomes tedious to test due to the potential need for the parent window and the iFrame to communicate.
I typically will place all of my functions as an onEnter action to the slide so that they can be called from any of multiple events on the slide, whether that be a button click or something else.