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

Initially select tab?

1 Answer 83 Views
TabStrip (Mobile)
This is a migrated thread and some comments may be shown as answers.
David T.
Top achievements
Rank 1
David T. asked on 28 Jan 2013, 06:09 PM
I have a tab strip that links to two views (snippet 1).  What I would like to do is have a way to initially select the second tab and its corresponding view.

I tried using the selectedIndex property (snippet 2), but it seems to always display whichever view I define first in code - I can change the highlighted tab, but what I really want to do is change the view that is displayed.

I have tried various versions of using the application's navigate method from body.onload, but that seems to work poorly.

Any ideas?

(Snippet 1)

        <div data-role="footer">
            <div data-role="tabstrip" id="tabstrip">
                <a href="#tabstrip-viewnotes" data-icon="recents">View Notes</a>
                <a href="#tabstrip-addnote" data-icon="add">Add Note</a>
            </div>
        </div>

(Snippet 2)

        $("#tabstrip").kendoMobileTabStrip({
                    selectedIndex: 1
                });

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 29 Jan 2013, 04:28 PM
Hello David,

I have already answered to your support ticket with the same question, however I am pasting my reply here too so the other users who are interested in the same can read it: 

You can point the id of initial View which Kendo UI Mobile Application to display. For example: 

Copy Code
new kendo.mobile.Application($(document.body), {
     initial: "tabstrip-addnote"
});
Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TabStrip (Mobile)
Asked by
David T.
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or