Upgrade your browser Download Chrome Download Chrome Download Firefox Download Firefox Download Opera Download Opera Download Safari Download Safari Download Explorer Download Explorer

Check out our newest children's book for iPad & iPhone: Who's in the Loo? Download Close

Robot Media


Using JavaScript in iBooks Enhanced ePub


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.

5 thoughts on “Using JavaScript in iBooks Enhanced ePub

  1. Something seems wrong with the ePub download itself. GitHub says “there is an error”

  2. admin says:

    No, it’s just that GitHub doesn’t know how to handle an ePub file.

    The quickest way to download it is to click on the big Download button on top. Or click here:


    Hope that helps!

  3. numan says:

    does iBooks let you embed javascript code that talks to the server (e.g ajax, jsonp calls) ?

  4. Gavin says:

    yeah does anyone have a working example of javascript talking to a server?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>