1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +02:00

added hash changes

This commit is contained in:
Fred Chasen 2013-01-27 18:06:59 -08:00
parent 954aba9627
commit 1554dda914
4 changed files with 48 additions and 10 deletions

View file

@ -88,9 +88,12 @@ FPR.app.init = (function($){
//-- Provide the Book with the url to show
// The Url must be found in the books manifest
Book.show(url);
e.preventDefault();
if(!Book.useHash){
Book.show(url);
e.preventDefault();
}
});
}
@ -102,7 +105,7 @@ FPR.app.init = (function($){
contents.forEach(function(item){
var $subitems,
$wrapper = $("<li id='toc-"+item.id+"'>"),
$item = $("<a class='toc_link' href='#"+item.href+"' data-url='"+item.href+"'>"+item.label+"</a>");
$item = $("<a class='toc_link' href='#/"+item.href+"' data-url='"+item.href+"'>"+item.label+"</a>");
$wrapper.append($item);