Problems creating Tabs dynamically

2 posts, 0 answers
  1. Andrew
    Andrew avatar
    3 posts
    Member since:
    Feb 2011

    Posted 15 Jan 2014 Link to this post


    I need to create 3 tabs dynamically (with JavaScript), It works fine, if I have another tab created before, if not, I can see the "tab titles" but not the content and I am don't know what happens.

    If I have this:

    <div id="tabstrip" >
           <li class="k-state-active">tab 1</li>
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>

    I can create new Tabs using this function:

    var tabStrip = $("#tabstrip").kendoTabStrip().data("kendoTabStrip");
                text: "title",
                content:  generateTabContent("19")

    And works fine, but I have problems when I try to create new tabs dynamically without any previous tabs... 

    I am sure that is something simple... but I cannot find the problem.

    Please can anyone help me? 
  2. Alexander Popov
    Alexander Popov avatar
    1411 posts

    Posted 16 Jan 2014 Link to this post

    Hi Andrew,

    I would recommend checking this example, which demonstrates how to add tabs to an empty TabStrip widget.

    Alexander Popov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top