Code:
So it loops though some elements on the page, and builds up an array to bind to the tabstrip. This all works great, however no tabs are selected when the page renders...if I manually click one all is good.
I've even tried setTimeout after the tabstrip initialization to do the .select as well, but no dice.
See here: http://screencast.com/t/Y22BMw27jsJ
<
ul
class
=
"kendo-tabstrip"
runat
=
"server"
style
=
"visibility:hidden"
>
<
li
class
=
"k-state-active"
>First Tab</
li
>
<
li
>Second Tab</
li
>
<
li
>Third Tab</
li
>
</
ul
>
<
div
>Tab1</
div
>
<
div
>Tab2</
div
>
<
div
>Tab3</
div
>
//Create the tab data
for
(
var
i = 0; i < subtabcontainer.length; i++) {
tabdata[i] = {
text: tabs[i].innerHTML,
content: subtabcontainer[i].innerHTML
};
}
var
tabstrip = $(
this
).kendoTabStrip({
dataTextField:
"text"
,
dataContentField:
"content"
,
dataSource: tabdata
}).data(
"kendoTabStrip"
).select(1);
So it loops though some elements on the page, and builds up an array to bind to the tabstrip. This all works great, however no tabs are selected when the page renders...if I manually click one all is good.
I've even tried setTimeout after the tabstrip initialization to do the .select as well, but no dice.
See here: http://screencast.com/t/Y22BMw27jsJ