.story-info.panel.panel-default.active
  .panel-heading
    .index-header
      Story Index
    .chapter-header.hide
      %a.index-back-btn{ href: '#', title: 'Back to Story Index'}
        %span.icon-story-index
        Back to Story Index
      .chapters-navigation
        %a.chapter-navigation.chapter-navigation-prev{ href: '#', title: 'Previous Chapter' }
          Previous Chapter
          %span.prev-chapter-icon
        .chapters-tracker
          %span.chapter-index 
          \/ #{@story.chapters.length}
        %a.chapter-navigation.chapter-navigation-next{ href: '#', title: 'Next Chapter' }
          Next Chapter
          %span.next-chapter-icon
    %button.close{type: "button", "aria-label" => "Close"}
      %span{"aria-hidden" => "true"}
        &times
  .panel-body
    .index-content
      - if @story.chapters
        %ul.chapters-list
          - @story.chapters.each_with_index do |chapter, index|
            %li
              %a.chapter{ href: chapter_path(chapter), title: chapter.name }
                %span.index
                  = index+1
                %span.title
                  = chapter.name
      - if defined? edit
        %a.btn.btn-default.btn-primary{ href: new_story_chapter_path(@story) }
          Add Chapter
    .chapter-content.hide
.story-info.panel.panel-default.active
  .panel-heading
    .index-header
      Story Index
    .chapter-header.hide
      %a.index-back-btn{ href: '#', title: 'Back to Story Index'}
        %span.icon-story-index
        Back to Story Index
      .chapters-navigation
        %a.chapter-navigation.chapter-navigation-prev{ href: '#', title: 'Previous Chapter' }
          Previous Chapter
          %span.prev-chapter-icon
        .chapters-tracker
          %span.chapter-index 
          \/ #{@story.chapters.length}
        %a.chapter-navigation.chapter-navigation-next{ href: '#', title: 'Next Chapter' }
          Next Chapter
          %span.next-chapter-icon
    %button.close{type: "button", "aria-label" => "Close"}
      %span{"aria-hidden" => "true"}
        &times
  .panel-body
    .index-content
      - if @story.chapters
        %ul.chapters-list
          - @story.chapters.each_with_index do |chapter, index|
            %li
              %a.chapter{ href: chapter.id, title: chapter.name }
                %span.index
                  = index+1
                %span.title
                  = chapter.name
      - if defined? edit
        %a.btn.btn-default.btn-primary{ href: new_story_chapter_path(@story) }
          Add Chapter
    .chapter-content.hide
Use chapter.id in chapters-list links in order to navigate to chapters using js
Use chapter.id in chapters-list links in order to navigate to chapters using js

That reverts a change in
https://github.com/civio/onodo/commit/799bd5dbeb1f30c178fb5c4c0ad28d496e
7b2eb0
