           @back = options.back
           if @back is true
             if @pageHistory.length > 1
+              # get target panel from history
               @targetPanel = @pageHistory[@pageHistory.length - 2]
               @targetPanel = document.querySelector(@targetPanel)
               transitionType = @targetPanel.getAttribute("data-transition")

      @currentPanel.addEventListener "webkitTransitionEnd", @finishTransition, false
    , 5

  finishTransition: =>
    @removeClass @currentPanel, 'visible'
    @addClass @targetPanel, 'visible'

    if @transitionAnimation isnt true
      @displayPage()

  # performs slide animation transition
  slideTransition: (speed) ->
    unless @targetPanel
      throw new Error "Need to set current div and target div in Slide in flight.slideTranstion"
