Enabled/Disabled right Button in NavBar

4 posts, 0 answers
  1. Adolfa
    Adolfa avatar
    2 posts
    Member since:
    Jul 2014

    Posted 23 Jul 2014 Link to this post

    Hi,
    I wrote a simple appl with a navbar and a title.
    Then I add the back button as a lot of examples show and it works perfect.
    I create a kind of log-in view where basically a user logs in and I'd like to show at the top right corner in the Nav Bar a button called Log out.
    Initially I add directly the button like this:

        <header data-role="header">
            <div data-role="navbar">
                <a class="nav-button" data-align="left" data-role="backbutton">Back</a>
                <span data-role="view-title"></span>
                <a id="logout" class="nav-button " data-align="right" data-role="button" onclick="Test.common.logOut()">Logout</a>
            </div>

        </header>

    It works of course, but what I should do is to hide it and show it only when the user is logged.
    With some jQury stuff I can hide it but not show it again. I missing something.
    Can someone please help me?

    thanks a lot
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 24 Jul 2014 Link to this post

    Hi Adolfa,

    The Kendo UI Mobile Button, has enable/disable functionality, that you can use in your case. Please check the following example, and let me know if it helps:

    http://jsbin.com/qatav/1/edit

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Adolfa
    Adolfa avatar
    2 posts
    Member since:
    Jul 2014

    Posted 28 Jul 2014 in reply to Kiril Nikolov Link to this post

    Hi Kiril,
    thanks for your reply. I try your example and it works. But I'm looking for a way to hide it instead of disabling it.

    thanks
  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 29 Jul 2014 Link to this post

    Hello Adolfa,

    Then you can just use the jQuery hide/show methods, like this:

    http://jsbin.com/qatav/2/edit

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready