It’s been known for a while that iBooks supports JavaScript on its ePub files, albeit without any technical documentation whatsoever to date.
Yet when we started experimenting with JavaScript within iBooks, we couldn’t find any open-source working examples. So we created one.
JQuery Hello World is a bare-bones ePub that shows a Hello World alert using JQuery. Not only it shows that JavaScript is supported within iBooks, but also that complex libraries like JQuery might be used.
Both the ePub file and the source code are available in our github account. Make sure you update to the latest iBooks version before trying it.
Happy coding! We will be publishing more iBooks ePub experiments shortly.