如何在ASP.NET中启用和禁用RunTime中的jQuery选项卡 [英] How to Enable And Disable jQuery Tab in RunTime In ASP.NET
问题描述
我想根据AJAX内容禁用和启用jQueryUI标签。
I want disable and enable jQueryUI tabs based on the AJAX content.
$("#tabs").tabs({
collapsible: true,
fx: [{
opacity: 'toggle',
duration: 'slow',
height: 'toggle'
},
{
opacity: 'toggle',
duration: 'slow',
height: 'toggle'
}],
beforeLoad: function (event, ui) {
}
});
和HTML代码:
And HTML Code:
<div id="tabs">
<ul>
<li class="context-tab"><a id="recent-tab" href="#iframe1">Recent</a></li>
<li class="context-tab"><a id="popular-tab" href="#iframe2">Popular</a></li>
<li class="context-tab"><a id="random-tab" href="#iframe3">Random</a></li>
<li class="context-tab"><a id="question-tab" href="#iframe4">By Question</a></li>
</ul>
<iframe id="iframe1" src="Default2.aspx" style="width: 100%;" height="900"></iframe>
<iframe id="iframe2" src="Default3.aspx" style="width: 100%;"></iframe>
<iframe id="iframe3" src="Default4.aspx" style="width: 100%;"></iframe>
<iframe id="iframe4" src="Default5.aspx" style="width: 100%;"></iframe>
</div>
例如,当用户选择popular-tab时,它会加载Default3.aspx页面。在每个页面中我都有下一个按钮。我希望当用户单击下一步按钮时,用户可以使用下一个选项卡,但不能使用以前的选项卡。例如,当用户在最近选项卡中并单击下一步按钮时,最近选项卡已启用但流行选项卡已禁用。
编辑01:
i有4页,例如page1.aspx,page2.aspx,page3.aspx,page4.aspx,默认情况下我有标签,当用户选择tabe recent-tab加载page1.aspx for user和page2.aspx和page3时。 aspx和page4.aspx是不活跃的,在第1页我有按钮当用户点击这个按钮我想去热门选项卡并加载page3.aspx和unactive recent-tab和活动的热门标签。等等,在第2页的下一个按钮中编写此代码时不起作用。谢谢你的帮助
谢谢。
For example when the user selects popular-tab it loads Default3.aspx page. In every page I have Next Button. I want when the user clicks the Next button this and the next tab are available to the user, but not the previous tabs. For example when a user in recent-tab and clicks the Next button recent-tab is enabled but popular-tab is disabled.
Edit 01:
i have 4 pages and example page1.aspx,page2.aspx,page3.aspx,page4.aspx, in default i have tab and when user select tabe recent-tab load page1.aspx for user and page2.aspx and page3.aspx and page4.aspx is unactive, in page1 i have button when user click in this button i want go to popular-tab and load page3.aspx and unactive recent-tab and active popular-tab. and etc, when write this code for button next in page2 not work. thanks for help me
Thanks.
推荐答案
( #tabs)。tabs({
collapsible: true ,
fx:[{
opacity:' toggle',
持续时间:' slow',
height:' toggle'
},
{
opacity:' toggle',
duration:' slow',
height:' toggle'
}],
beforeLoad: funct离子(event,ui){
}
});
("#tabs").tabs({ collapsible: true, fx: [{ opacity: 'toggle', duration: 'slow', height: 'toggle' }, { opacity: 'toggle', duration: 'slow', height: 'toggle' }], beforeLoad: function (event, ui) { } });
和HTML代码:
And HTML Code:
<div id="tabs">
<ul>
<li class="context-tab"><a id="recent-tab" href="#iframe1">Recent</a></li>
<li class="context-tab"><a id="popular-tab" href="#iframe2">Popular</a></li>
<li class="context-tab"><a id="random-tab" href="#iframe3">Random</a></li>
<li class="context-tab"><a id="question-tab" href="#iframe4">By Question</a></li>
</ul>
<iframe id="iframe1" src="Default2.aspx" style="width: 100%;" height="900"></iframe>
<iframe id="iframe2" src="Default3.aspx" style="width: 100%;"></iframe>
<iframe id="iframe3" src="Default4.aspx" style="width: 100%;"></iframe>
<iframe id="iframe4" src="Default5.aspx" style="width: 100%;"></iframe>
</div>
例如,当用户选择popular-tab时,它会加载Default3.aspx页面。在每个页面中我都有下一个按钮。我希望当用户单击下一步按钮时,用户可以使用下一个选项卡,但不能使用以前的选项卡。例如,当用户在最近选项卡中并单击下一步按钮时,最近选项卡已启用但流行选项卡已禁用。
编辑01:
i有4页,例如page1.aspx,page2.aspx,page3.aspx,page4.aspx,默认情况下我有标签,当用户选择tabe recent-tab加载page1.aspx for user和page2.aspx和page3时。 aspx和page4.aspx是不活跃的,在第1页我有按钮当用户点击这个按钮我想去热门选项卡并加载page3.aspx和unactive recent-tab和活动的热门标签。等等,在第2页的下一个按钮中编写此代码时不起作用。谢谢你的帮助
谢谢。
For example when the user selects popular-tab it loads Default3.aspx page. In every page I have Next Button. I want when the user clicks the Next button this and the next tab are available to the user, but not the previous tabs. For example when a user in recent-tab and clicks the Next button recent-tab is enabled but popular-tab is disabled.
Edit 01:
i have 4 pages and example page1.aspx,page2.aspx,page3.aspx,page4.aspx, in default i have tab and when user select tabe recent-tab load page1.aspx for user and page2.aspx and page3.aspx and page4.aspx is unactive, in page1 i have button when user click in this button i want go to popular-tab and load page3.aspx and unactive recent-tab and active popular-tab. and etc, when write this code for button next in page2 not work. thanks for help me
Thanks.
这篇关于如何在ASP.NET中启用和禁用RunTime中的jQuery选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!