This is a migrated thread and some comments may be shown as answers.

Enabled/Disabled right Button in NavBar

3 Answers 151 Views
NavBar
This is a migrated thread and some comments may be shown as answers.
Adolfa
Top achievements
Rank 1
Adolfa asked on 23 Jul 2014, 12:30 PM
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

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 24 Jul 2014, 08:43 AM
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!
 
0
Adolfa
Top achievements
Rank 1
answered on 28 Jul 2014, 06:22 PM
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
0
Kiril Nikolov
Telerik team
answered on 29 Jul 2014, 11:32 AM
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!
 
Tags
NavBar
Asked by
Adolfa
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Adolfa
Top achievements
Rank 1
Share this question
or