/** * Created by markop on 11/09/15. */ (function(){ var jqScreen = $("#screen_about"), jqBtnGoBack = $("#btnAboutGoBack"); codeq.globalStateMachine.register('about',{ 'enter': function(){ jqBtnGoBack.on('click',function(){ history.back();//forces a transition to the previous state }); jqScreen.css('display', ''); }, 'exit' : function(){ jqScreen.css('display', 'none'); jqBtnGoBack.off('click'); } }); })();