Results 1 to 3 of 3
  1.    #1  
    Hello,

    I've been trying various methods to get a button that will go to the next scene when tapped on. I used the

    Code:
    <div x-mojo-element="Button" id="today" class="palm-button" x-mojo-tap-highlight="momentary>Today</div>
    It is displayed and I can tap on it but, it doesn't do anything. Can someone help me with it so it can link to another scene.

    Thanks!
  2. jjlucsy's Avatar
    Posts
    51 Posts
    Global Posts
    56 Global Posts
    #2  
    In you scenes setup function:
    Code:
    Mojo.Event.listen( this.controller.get( 'today' ), Mojo.Event.tap, this.ShowToday.bind( this ) );
    then you need a function:
    Code:
    SomeSceneAssistant.prototype.ShowToday = function(event) {
        Mojo.Controller.stageController.pushScene( 'today' );
    }
    and don't forget to put in cleanup:
    Code:
    Mojo.Event.stopListening( this.controller.get( 'today' ), Mojo.Event.tap, this.ShowToday.bind( this ) );
  3.    #3  
    Thanks for your help

Tags for this Thread

Posting Permissions