Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

ons-toolbar visibility



  • Hi guys thanks for the help you gave me last time i was here it helped a lot but now an having a different issue. i wish to make my toolbar disappear maybe while scrolling or when a button is pressed. i could do it with my ons-tabbar with

    
    document.getElementById('myTabbar').setTabbarVisibility(false);
    

    is there a way to do the same with the toolbar? i checked with the documentation but didn’t fine anything about that. i will appreciate any help thanks.


  • Onsen UI

    This isn’t currently supported for the toolbar, though I don’t see any reason why it shouldn’t be. I’ll see if it’s something we can add for an upcoming release.

    For now, you could achieve this by CSS:

    .toolbar.hidden {
      display: none;
    }
    
    .toolbar.hidden + .page__background,
    .toolbar.hidden + .page__background + .page__content {
      top: 0;
    }
    

    Then just do:

    document.getElementById('myToolbar').classList.add('hidden');