Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7994467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:08:23+00:00 2026-06-04T14:08:23+00:00

I have a vertical menu which is working on jquery. HTML and Jquery is

  • 0

I have a vertical menu which is working on jquery. HTML and Jquery is below:

HTML:

<div id="menu">
            <ul class="navmenu">
                <li>
                    <div class="menutop menusingle">
                        <a id="A1" runat="server"  href="~/View.aspx?pg=aboutus" >About Us </a></div>
                </li>
                <li>
                    <div class="menutop">
                        <a href="#">Courses</a><div class="toggle">
                            +</div>
                    </div>
                    <ul class="submenu">
                        <li><a id="A6" runat="server"  href="~/View.aspx?pg=SoftwareIT">Software /IT</a></li>
                        <li><a id="A7" runat="server"  href="~/View.aspx?pg=Telecommunication">Telecommunication</a></li>
                        <li><a id="A8" runat="server"  href="~/View.aspx?pg=Hardware">Hardware & Networking</a></li>
                        <li><a id="A9" runat="server"  href="~/View.aspx?pg=Sales">Sales & Marketing</a></li>
                        <li><a id="A10" runat="server"  href="~/View.aspx?pg=BPO">BPO & Soft Skills</a></li>
                    </ul>
                </li>
                <li>
                    <div class="menutop">
                        <a href="#">Services</a><div class="toggle">
                            +</div>
                    </div>
                    <ul class="submenu">
                        <li><a id="A2" runat="server"  href="~/View.aspx?pg=IndividualTraining">Individual Training </a></li>
                        <li><a id="A3" runat="server"  href="~/View.aspx?pg=OncampusTraining ">On Campus Training </a></li>
                        <li><a id="A4" runat="server"  href="~/View.aspx?pg=CorporateTraining">Corporate Training </a></li>
                        <li><a id="A5" runat="server"  href="~/View.aspx?pg=Placement">Placement </a></li>
                    </ul>
                </li>
                <li>
                    <div class="menutop">
                        <a href="#">Trainings</a><div class="toggle">
                            +</div>
                    </div>
                    <ul class="submenu">
                        <li><a id="A11" runat="server"  href="~/View.aspx?pg=FastTrack">FastTrack Training</a></li>
                        <li><a id="A12" runat="server"  href="~/View.aspx?pg=Summer">Summer/Industrial</a></li>
                        <li><a id="A13" runat="server"  href="~/View.aspx?pg=Weekend">Weekend Training</a></li>
                    </ul>
                </li>
            </ul>
        </div>

On clicking the + sign it open a drawer for submenu. Which is manually very fine. Now I want to automate it according to request. We have toggle in Training, Courses and Services, so if the current url is of services then the services menu will get opened, automatically. As we have a top navigation and footer navigation also. The above is a left navigation.

Jquery for the same:

<script type="text/javascript">
    $(document).ready(function() {

        $('.toggle:not(.toggle-open)').addClass('toggle-closed').parents('li').children('ul').hide();

        if ($.browser.msie) {
            $('#menu ul.navmenu li:last-child .menutop').css('border-bottom', '1px solid #CCC');
        }

        $('.toggle').click(function() {
            if ($(this).hasClass('toggle-open')) {
                $(this).removeClass('toggle-open').addClass('toggle-closed').empty('').append('+').parents('li').children('ul').slideUp(250);
                $(this).parent('.menutop').removeClass('menutop-open').addClass('menutop-closed');
            } else {
                $(this).parent('.menutop').removeClass('menutop-closed').addClass('menutop-open');
                $(this).removeClass('toggle-closed').addClass('toggle-open').empty('').append('&ndash;').parents('li').children('ul').slideDown(250);
            }

        });
    })
</script>

So I need a way to invoke the $('.toggle').click(function() from cs, on the basis of the query string.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T14:08:25+00:00Added an answer on June 4, 2026 at 2:08 pm

    Get query string value from key . and Based on your condition it will invoke click.

    Request.QueryString[key].ToString()
    

    I assume your js code is inline.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a vertical menu in my system which is basically made of HTML
I have vertical submenu as under: <div id=dropdown_menu class=menu> <ul> <li> <a>First Link</a></li> <li>
Here is the situation : I have a vertical menu with div. Each div
I have a CSS vertical menu I have created code is below. (Test page
I have a vertical drop-down menu that is working fairly well. I have one
i have made a css sticky footer menu which is working great apart from
I have the below html that is supposed to create a fly out Menu.
I have a menu scripted with jQuery, which pops out when triggered by an
I have a vertical css menu that I want to convert to a dropdown.
I have an XSLT script to output a simple vertical menu, however on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.