View Single Post
Old 02-28-2013, 07:47 AM   #8
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
Quote:
Originally Posted by tincanbot View Post
Thank you for your response, AlPe. I can embed normal javascript into an eBook without any issues and it'll display just fine on the iPad. I'm wondering if the iPad can natively understand and display jQuery code or if I would have to embed the jQuery source code in the eBook or use some sort of namespace reference in the header, etc., and if so how that's done. Thus far all of my attempts have been for naught. I'm beginning to think it's not possible, unfortunately.
Add in the XHTML page (say) p001.xhtml:
Code:
<script src="path/to/your/script.js" type="text/javascript"></script>
In the OPF file:
Code:
<item id="p001" href="path/to/your/p001.xhtml" media-type="application/xhtml+xml" properties="scripted"/>
<item id="s001" href="path/to/your/script.js" media-type="text/javascript"/>
If you are going to try this in iBooks, you might want/need to include META-INF/com.apple.ibooks.display-options.xml declaring:
Code:
<option name="interactive">true</option>
AlPe is offline   Reply With Quote