我可以在javascript或默认视图中做什么来满足2个视图? [英] What can i do in javascript or the default view to satisfy 2 views?
问题描述
这就是问题所在。请告诉我你的任何见解。第一个JQuery
jQuery('#HeaderPanelAccordionPane1_a')。text('点击这里折叠标题');
正在影响2个不同的视图,因为2个应用程序有1个Default.aspx页面(1个内部,1个公开)。
我可以在JavaScript或默认视图中做什么来满足2个视图?我希望选项在公共视图中折叠标题,但不在内部视图中。我知道在这种情况下我可以将RequireOpenedPane =更改为true,但公共视图也会受到影响。我真的希望得到一些帮助。谢谢!
DEFAULT.ASPX
< asp:Accordion ID =HeaderPanelrunat =ServerSelectedIndex =0HeaderCssClass =AccordionHeaderHeaderSelectedCssClass =AccordionHeader AutoSize =无FadeTransitions =falseTransitionDuration =1FramesPerSecond =500Width =100%RequireOpenedPane =falseSuppressHeaderPostbacks =True>
< asp :AccordionPane ID =HeaderPanelAccordionPane1runat =server>< Header> 点击此处折叠标题< /标题>
JAVASCRIPT
if(eventArgs){
if(selectedIndex == - 1|| accordion._selectedIndex == -1){
$('#NavigationMenuDiv')。hide();
jQuery('#HeaderPanelAccordionPane1_a')。text('Click Here to Collapse Header' );
jQuery('#HeaderPanelAccordi onPane1_a')。addClass('collapsed');
}
else if(selectedIndex ==0|| accordion._selectedIndex ==0){
$('#NavigationMenuDiv')。show();
frmHeight - =(menudiv.height()+ headerDivheight) ;
jQuery('#HeaderPanelAccordionPane1_a')。removeClass('collapsed');
}
< b>我尝试了什么:
在这种情况下,我可以将RequireOpenedPane =更改为true,但公共视图也会受到影响。
('#NavigationMenuDiv')。hide();
jQuery('#HeaderPanelAccordionPane1_a' ).text('点击这里折叠标题');
jQuery('#HeaderPanelAccordionPane1_a')。addClass('collapsed');
}
else if(selectedIndex ==0|| accordion._selectedIndex ==0){
('#NavigationMenuDiv')。show();
frmHeight - =(menudiv.height()+ headerDivheight);
jQ uery('#HeaderPanelAccordionPane1_a')。removeClass('collapsed');
}
我的尝试:
在这种情况下,我可以将RequireOpenedPane =更改为true,但公共视图也会生效。
Well here's the issue. Please give me any insight you can. The first JQuery
jQuery('#HeaderPanelAccordionPane1_a').text('Click Here to Collapse Header');
is effecting 2 different views due to the fact that there is 1 Default.aspx page for 2 applications ( 1 in-house and one to the public ).
What can I do in JavaScript or the default view to satisfy 2 views? I want the the option to Collapse The Header in the public view but not in the in-house view. I know that I can change RequireOpenedPane="" to true in this case but then the public view will be effected as well. I would really like some help on this. Thanks!
DEFAULT.ASPX
<asp:Accordion ID="HeaderPanel" runat="Server"SelectedIndex="0" HeaderCssClass="AccordionHeader" HeaderSelectedCssClass="AccordionHeader"AutoSize="None" FadeTransitions="false"TransitionDuration="1"FramesPerSecond="500" Width="100%"RequireOpenedPane="false"SuppressHeaderPostbacks="True">
<asp:AccordionPane ID="HeaderPanelAccordionPane1" runat="server"><Header>Click Here to Collapse Header</Header>
JAVASCRIPT
if (eventArgs) {
if (selectedIndex == "-1" || accordion._selectedIndex == "-1") {
$('#NavigationMenuDiv').hide();
jQuery('#HeaderPanelAccordionPane1_a').text('Click Here to Collapse Header');
jQuery('#HeaderPanelAccordionPane1_a').addClass('collapsed');
}
else if (selectedIndex == "0" || accordion._selectedIndex == "0") {
$('#NavigationMenuDiv').show();
frmHeight -= (menudiv.height() + headerDivheight);
jQuery('#HeaderPanelAccordionPane1_a').removeClass('collapsed');
}
What I have tried:
I can change RequireOpenedPane="" to true in this case but then the public view will be effected as well.
('#NavigationMenuDiv').hide();
jQuery('#HeaderPanelAccordionPane1_a').text('Click Here to Collapse Header');
jQuery('#HeaderPanelAccordionPane1_a').addClass('collapsed');
}
else if (selectedIndex == "0" || accordion._selectedIndex == "0") {
('#NavigationMenuDiv').show();
frmHeight -= (menudiv.height() + headerDivheight);
jQuery('#HeaderPanelAccordionPane1_a').removeClass('collapsed');
}
What I have tried:
I can change RequireOpenedPane="" to true in this case but then the public view will be effected as well.