This question is locked. New answers and comments are not allowed.
I have a tabstrip on a page,
<% Html.Telerik().TabStrip()
.Name("TabStrip")
.Items(tabstrip =>
{
tabstrip.Add()
.Text("Based on jQuery")
.Content(() =>
{%>
<p>
The client-side code of the Telerik Extensions for ASP.NET MVC is based on
</p>
<%});
tabstrip.Add()
.Text("Cross-browser Support")
.Content(() =>
{%>
<p>
Telerik is renowned for making its product consistent across all major browsers:
</p>
<%});
})
.Render(); %>
and a button that onclicking disables the second tab(index -> 1) on the tabstrip,
<button class="t-button t-state-default" onclick="Disable()">Disable</button>
It calls the javascript function as follows,
<script type="text/javascript">
function Disable() {
var tabstrip = $("#TabStrip").data("tTabStrip");
var item = $("li", tabstrip.element)["1"];
tabstrip.disable(item);
}
</script>
This works fine. But what I need is that I should be able to disable the tabs on the tabstrip on pageload i.e. onLoad event.
I tried calling the function on
});
But it does not work.Please let me know if we can disable a tab on tabstrip on OnLoad event.
Thanks
Anil
<% Html.Telerik().TabStrip()
.Name("TabStrip")
.Items(tabstrip =>
{
tabstrip.Add()
.Text("Based on jQuery")
.Content(() =>
{%>
<p>
The client-side code of the Telerik Extensions for ASP.NET MVC is based on
</p>
<%});
tabstrip.Add()
.Text("Cross-browser Support")
.Content(() =>
{%>
<p>
Telerik is renowned for making its product consistent across all major browsers:
</p>
<%});
})
.Render(); %>
and a button that onclicking disables the second tab(index -> 1) on the tabstrip,
<button class="t-button t-state-default" onclick="Disable()">Disable</button>
It calls the javascript function as follows,
<script type="text/javascript">
function Disable() {
var tabstrip = $("#TabStrip").data("tTabStrip");
var item = $("li", tabstrip.element)["1"];
tabstrip.disable(item);
}
</script>
This works fine. But what I need is that I should be able to disable the tabs on the tabstrip on pageload i.e. onLoad event.
I tried calling the function on
$(document).ready(function() {
Disable() ;});
But it does not work.Please let me know if we can disable a tab on tabstrip on OnLoad event.
Thanks
Anil