Technicly, it is possible, but the problem, as always with EPUB 3, is the support in reading applications/devices.
Specifically, iBooks has some problems with jQuery (I did some testing a couple of months ago, I do not rember exactly what went wrong). Readium should be ok. But other readers (say, Blio) completely ignore the JS embedded.
EDIT: for the "how", have a look at the IDPF samples. Basically, include your JS script, add it to the manifest, and add "scripted" property to the page(s) using it.
|