root = this
root.calatrava ?= {}
calatrava = root.calatrava

# Hide all the sub-pages when first launching the app
$(document).ready ->
  $('body > .container > .page').hide()

window.onpopstate = (event) ->
  if event.state
    tw.bridge.changePage event.state.page

root = this
root.calatrava ?= {}
calatrava = root.calatrava

# Hide all the sub-pages when first launching the app
$(document).ready ->
  $('body > .container > .page').hide()

window.onpopstate = (event) ->
  if event.state
    calatrava.bridge.changePage event.state.page

Fix for back button being broken in web apps
Fix for back button being broken in web apps

It was still referring to the tw.bridge rather than calatrava.bridge
