From: Marek Stępniowski Date: Thu, 18 Sep 2008 11:36:45 +0000 (+0200) Subject: Fixed a book in book.js when link to main page didn't work in book reader. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/350fbc78517b633df190da93bf654825626f5997 Fixed a book in book.js when link to main page didn't work in book reader. --- diff --git a/wolnelektury/media/js/book.js b/wolnelektury/media/js/book.js index dcab8b125..fb4467f7b 100644 --- a/wolnelektury/media/js/book.js +++ b/wolnelektury/media/js/book.js @@ -17,7 +17,7 @@ $(function() { // On page load, scroll to anchor scrollToAnchor(window.location.hash) - $('body').delegate('click', '#toc a, #themes a, .anchor, .annotation', function(event) { + $('#toc, #themes, #book-text').delegate('click', 'a', function(event) { event.preventDefault(); $('#menu li a.selected').click(); scrollToAnchor($(this).attr('href'));