Dynamically select tab after creation

2 posts, 0 answers
  1. Pierre
    Pierre avatar
    212 posts
    Member since:
    Apr 2007

    Posted 10 Jan 2014 Link to this post

    I use this HTML:
    <div id='test'>
        <ul>
            <li>Tab1</li>
            <li>Tab2</li>
            <li>Tab3</li>
        </ul>
        <div>
           Content 1
        </div>
        <div>
            Content 2
        </div>
        <div>
            Content 3
        </div>
    </div>

    Then convert it to TabStrip:
    $('test').kendoTabStrip({
        animation: {
            open: {
                effects: effet
            }
        }
    });
     
     
    var tabs = $elem.data("kendoTabStrip");        //Get Kendo element
    tabs .select("li:contains('Tab1')");

    The tab is selected, but containt not visible.  If I trig the same code with a button click, all is working good.
    If I use the class="k-state-active" in the HTML the tab is selected and the containt is visible.
    Thanks
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 13 Jan 2014 Link to this post

    Hi Pierre,

    I have created a working example, showing a possible implementation of the feature that you are looking for. Please check it out and let me know if you have any questions:

    http://jsbin.com/ULOziToC/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
Back to Top