hi
there is megamenu in default .aspx:
that below is code:
<div class="red">
<ul id="mega-menu-10" class="mega-menu">
<li><a href="#" id="mainsoft"> </a>
<ul>
<li><a href="#">برنامه های موبایل</a>
<div id="mega1">
</div>
<ul>
<asp:Repeater ID="RptMobile" runat="server">
<ItemTemplate>
<li><a target="_blank">
<asp:LinkButton ID="Linkbtnclass" runat="server" CommandArgument='<%# Eval("Secondclass") %>'
OnClick="LinkbtnclassM_Click"><%# Eval("Secondclass") %></asp:LinkButton></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</li>
<li><a href="#">برنامه های کاربردی</a>
<div id="mega2">
</div>
<ul>
<asp:Repeater ID="Rptkarbordi1" runat="server">
<ItemTemplate>
<li><a target="_blank">
<asp:LinkButton ID="Linkbtnclass" runat="server" CommandArgument='<%# Eval("Secondclass") %>'
OnClick="LinkbtnclassM_Click"><%# Eval("Secondclass") %></asp:LinkButton></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</li>
<li><a href="#">برنامه های کاربردی</a>
<div id="mega3">
</div>
<ul>
<asp:Repeater ID="Rptkarbordi" runat="server">
<ItemTemplate>
<li><a target="_blank">
<asp:LinkButton ID="Linkbtnclass" runat="server" CommandArgument='<%# Eval("Secondclass") %>'
OnClick="LinkbtnclassM_Click"><%# Eval("Secondclass") %></asp:LinkButton></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</li>
<li><a href="#">برنامه نویسی</a>
<div id="mega4">
</div>
<ul>
<asp:Repeater ID="Rptprog" runat="server">
<ItemTemplate>
<li><a target="_blank">
<asp:LinkButton ID="Linkbtnclass" runat="server" CommandArgument='<%# Eval("Secondclass") %>'
OnClick="LinkbtnclassM_Click"><%# Eval("Secondclass") %></asp:LinkButton></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</li>
<li><a href="#">فنی و مهندسی</a>
<div id="mega5">
</div>
<ul>
<asp:Repeater ID="Rptfani" runat="server">
<ItemTemplate>
<li><a target="_blank">
<asp:LinkButton ID="Linkbtnclass" runat="server" CommandArgument='<%# Eval("Secondclass") %>'
OnClick="LinkbtnclassM_Click"><%# Eval("Secondclass") %></asp:LinkButton></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</li>
<li><a href="#">گرافیک و فیلم</a>
<div id="mega6">
</div>
<ul>
<asp:Repeater ID="Rptfilm" runat="server">
<ItemTemplate>
<li><a target="_blank">
<asp:LinkButton ID="Linkbtnclass" runat="server" CommandArgument='<%# Eval("Secondclass") %>'
OnClick="LinkbtnclassM_Click"><%# Eval("Secondclass") %></asp:LinkButton></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</li>
<li><a href="#">سیستم عامل</a>
<div id="mega7">
</div>
<ul>
<asp:Repeater ID="rptSystem" runat="server">
<ItemTemplate>
<li><a target="_blank">
<asp:LinkButton ID="Linkbtnclass" runat="server" CommandArgument='<%# Eval("Secondclass") %>'
OnClick="LinkbtnclassM_Click"><%# Eval("Secondclass") %></asp:LinkButton></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</li>
</ul>
</li>
</ul>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
localStorage.removeItem('SelectedMenu');
$('li a').on('click', function () {
localStorage.setItem("SelectedMenu", $(this)[0].innerHTML);
});
});
</script>
</div>
protected void LinkbtnclassM_Click(object sender, EventArgs e)
{
LinkButton ImgEdit = (LinkButton)sender;
Response.Redirect("Software/" + ImgEdit.CommandArgument);
}
that when click Item from mega menu it will go to software.aspx page:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
var selctedMenuHtml = localStorage.getItem('SelectedMenu');
var selectedMenu = $.grep($('[id*=MM21] ul a'), function (ele) {
return $(ele).html().trim() == selctedMenuHtml.trim();
}).pop();
$(selectedMenu).addClass('SelectedActiveMenu');
$(selectedMenu).focus();
});
</script>
<div id="MM21" class="dasteS">
<div id="film" visible="false" runat="server">
<li><a href="#">Film Information</a>
<div id="mega2">
</div>
<ul>
<asp:Repeater ID="Repeater9" runat="server">
<ItemTemplate>
<li><a target="_blank">
<asp:LinkButton ID="Linkbtnclass" runat="server" CommandArgument='<%# Eval("Secondclass") %>'
OnClick="LinkbtnclassM_Click"><%# Eval("Secondclass") %></asp:LinkButton></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</li>
</div>
<div id="image" visible="false" runat="server">
<li><a href="#">Image Information</a>
<div id="mega2">
</div>
<ul>
<asp:Repeater ID="Repeater10" runat="server">
<ItemTemplate>
<li><a target="_blank">
<asp:LinkButton ID="LinkButton1" runat="server" CommandArgument='<%# Eval("Secondclass") %>'
OnClick="LinkbtnclassM_Click"><%# Eval("Secondclass") %></asp:LinkButton></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</li>
</div>
</div>
here (in above code) is two div:
<div id="film" visible="false" runat="server">
...
</div>
<div id="image" visible="false" runat="server">
....
</div>
now I want if users click Item from megamenu that I show with green arrow it do film.visibility=true
and if users select Item from megamenu that I show with red arrow it do Image.visibility=True
How I can do it?
Best regards
Neda