Navigation

    Monaca & Onsen UI
    • Register
    • Login
    • Search
    • Tags
    • Users
    • Blog
    • Playground
    1. Home
    2. jokorivai
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    Joko Rivai

    @jokorivai

    0
    Reputation
    3
    Posts
    1035
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Website kppdi.ga Location Makassar, Indonesia

    jokorivai Follow

    Posts made by jokorivai

    • RE: ons-navigator

      @Fran-Diox sorry to ask this: Is there any way to prevent application from exiting when user click back-button (hardware) and no more page exists in page stack?

      Scenario:

      1. Navigating: MainPage>pushPage>pushPage
      2. Hardware Backbutton: popPage>popPage>exit app

      Is there a way to prevent exit app, just stay on the MainPage?

      posted in v1.x
      jokorivai
    • RE: ons-scroller

      I found an example by @argelius here:
      https://github.com/OnsenUI/OnsenUI/issues/748

      My working code is:

              var onsScroller = $('#scroller  > .ons-scroller__content');
              alert(onsScroller[0].scrollTop);
              // code to insert some elements here
              onsScroller[0].scrollTop = 1000000;
              alert(onsScroller[0].scrollTop);
      

      The last alert will display current scrollTop value, not 1000000.
      Thank you.

      ablegao created this issue in OnsenUI/OnsenUI

      closed ons-scroller don't get scrollTop value . #748

      posted in v1.x
      jokorivai
    • RE: ons-scroller

      @Fran-Diox @serdarde, I have this code

              var onsScroller = $('#scroller');
              alert(onsScroller[0].scrollTop);
              // code to insert some elements here
              onsScroller[0].scrollTop = 1000000;
              alert(onsScroller[0].scrollTop);
      

      both alerts display 0.
      I also tried

              var onsScroller = $('#scroller');
              alert(onsScroller.scrollTop());
              // code to insert some elements here
              onsScroller.scrollTop(1000000);
              alert(onsScroller.scrollTop());
      

      with exactly same result. Please advise. Thank you.

      posted in v1.x
      jokorivai