       targetDiv.style.webkitTransform = "translateX(0%)"
 
       # use window timeout to delay transition or will not work on android device
-      window.setTimeout ->
-        currDiv.style.webkitTransition = "#{speed}"
-        currDiv.style.webkitTransform = "translateX(100%)"
+      window.setTimeout =>
+        @currentPanel.style.webkitTransition = "#{speed}"
+        @currentPanel.style.webkitTransform = "translateX(100%)"
         targetDiv.className += " visible"
       , 10
 


    if @isTransitioning is true then return else @isTransitioning = true

    currDiv = document.querySelector currDiv
    targetDiv = document.querySelector targetDiv

    targetDiv.style.display = "block"
    currDiv.style.display = "block"

    if back is true


      else
        firstChild = firstChild.nextSibling

  slideTransition: (targetDiv, speed, back) ->

    # TODO: look into transform origin
    # TODO: make use of data tags

    unless @ and targetDiv
      throw new Error "Need to set current div and target div in Slide in flight.slideTranstion"
      return

