TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Hari Shanker
NA
260
34k
How to Make the Sub menu of accordion active after redirect
Jan 11 2017 2:52 AM
Hi,
I want my sub menu active when ever i am clicking the sub menu and redirecting to another page using html and jquery.
but here in my case it is getting collapse.please do advise..here is my js and css
$(document).ready(function () {
$("#accordion > li > div").click(function () {
if (false == $(this).next().is(':visible')) {
$('#accordion ul').slideUp(300);
}
$(this).next().slideToggle(300);
});
$('.sub-menu1').click(function () {
$('ul:eq(0)').show();
});
<div class="menu" style="display: inline-block; width: 20%; vertical-align: top; border: 1px solid #000000; min-height: 545px;">
<ul id="accordion">
<li>
<div>Masters</div>
<ul class="sub-link">
<li class="sub-link1"><a class="sub-menu1" href="@Url.Action("ShowAllItemTypes", "Master")">Item Type</a></li>
</ul>
</li>
<li>
<div>Search</div>
<ul>
<li><a class="sub-menu1" href="#">Search</a></li>
</ul>
</li>
<li>
<div>Tasks</div>
<ul>
<li><a class="sub-menu1" href="#">Tasks</a></li>
</ul>
</li>
<li>
<div>Reports</div>
<ul>
<li><a class="sub-menu1" href="#">Reports</a></li>
</ul>
</li>
<li>
<div>Configuration</div>
<ul>
<li><a class="sub-menu1" href="#">Configuration</a></li>
</ul>
</li>
</ul>
Regards,
Hari
Reply
Answers (
3
)
How to Create Setup File to a Web Application or a Website
how to use CRUD in asp.net core mvc