From 52d1be02c9aab662cfa29f63d4cd872a4f795a4d Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 16 Aug 2013 09:49:29 +0000 Subject: [PATCH] --- js/libs/fluidbook/views/fluidbook.chapters.js | 38 ++++++------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/js/libs/fluidbook/views/fluidbook.chapters.js b/js/libs/fluidbook/views/fluidbook.chapters.js index e6f7c01a..dca8d87f 100644 --- a/js/libs/fluidbook/views/fluidbook.chapters.js +++ b/js/libs/fluidbook/views/fluidbook.chapters.js @@ -38,20 +38,7 @@ FluidbookChapters.prototype = { } this.html = $(h).get(0).outerHTML; - - if (this.style == 'classic') { - $(document).on('click', 'ul.chapters a', function() { - - var li = $(this).parent(); - var subnav = $(li).children('ul'); - if ($(subnav).length) { - $(subnav).slideToggle(); - return false; - } else { - return true; - } - }); - } else if (this.style == 'ina') { + if (this.style == 'ina') { $(document).on('click', 'ul.chapters a .right', function(e) { var p = $(this).data('page'); if (p != '') { @@ -61,20 +48,19 @@ FluidbookChapters.prototype = { e.preventDefault(); return false; } - - }); - - $(document).on('click', 'ul.chapters a', function() { - var li = $(this).parent(); - var subnav = $(li).children('ul'); - if ($(subnav).length) { - $(subnav).slideToggle(); - return false; - } else { - return true; - } }); } + + $(document).on('click', 'ul.chapters a', function() { + var li = $(this).parent(); + var subnav = $(li).children('ul'); + if ($(subnav).length) { + $(subnav).slideToggle(); + return false; + } else { + return true; + } + }); }, makeClassicMenu: function() { var $this = this; -- 2.39.5