3 $.fn.Readings.reader = function(opts) {
6 return Readings.catalogue.fetchBook(opts.book_id, true, function(book) {
7 return $(_this).find("#content-reader").empty().append(book.getText());
11 load_book: function(slug) {
12 return this.each(function() {
17 url: '/fixtures/katalog_lektura_lord-jim.html',
19 return console.log("Error " + e);
21 success: function(page) {
22 var $page, $text, $toc;
24 $text = $page.find('#book-text');
25 $toc = $text.find('#toc');
26 _this.toc = $toc.find('a').map(function(_i, link) {
34 return $('[data-role=header] h1', _this).text(_this.text.find('h1 .title').text());