Reputation: 21
I tried to read the epub file
using epub.min.js
but I didn't get an output.
In body tag I wrote the code:
<div onclick="Book.prevPage()">‹</div>
<div id="area"></div>
<div onclick="Book.nextPage()">›</div>
<script src="js/zip.min.js"></script>
<script src="js/epub.min.js"></script>
<script>
var Book = ePub('../epub/ANewDay');
Book.renderTo('area');//div id
EPUBJS.Render.Iframe.prototype.setLeft = function(leftPos){
this.document.documentElement.style.WebkitTransform = 'translate("-" + leftPos +"px", 0)';
};
</script>
Upvotes: 0
Views: 623
Reputation: 959
Are you getting any console errors? Try playing around with this file path:
var Book = ePub('../epub/ANewDay');
if your epub/ directory is a direct child of www/ try "epub/ANewDay" for your file path. Also check file extension.
Upvotes: 1