I need javascript code for a toggled list

Hello dear, Please I have a ul list that I added toggle to using Javascript

and set display to none using Css and everything is working fine.

I am looking for someone to write the javascript to make the link display (not collapsed) on the next page when the links under the parent menu is clicked. So, in nutshell, the parent and children are collapsed by default but when any of the links is

clicked and the page loads, the links would not be collapsed in the new page unlike the initially collapsed menu when the page was first visited.

A solution I'm thinking of is to remove the default code and instead test whether or not a list item was selected on last page. If there was a variable selected, have the menu expand to that li otherwise collapse entire menu. I just need someone to write the javascript code. Thanks

Here's my current markup


<li>Main Title



<a href="#">link 1 </a>



<a href="#">link 2 </a>



<a href="#">link 3 </a>






ul li ul{ display: none; }





[url removed, login to view]();



Skills: CSS, HTML5, Javascript, jQuery / Prototype, Shopify

See more: i need javascript writer chennai, i need javascript writer, help pls i need a job as an international writer, help me i need a logo, plz help me i am a hard working man need a job, please somebody help me i m trying to write a very good song for a project and i need help in making the following rhyming words, i need a lawyer to help me i m blacklisted around emalahleni, i m going to open now a new business with 20000 usd i have right now 10000 usd i need another 10000 usd instead of going to a ba, help needed i need a personal assistant for dailey duties, i need javascript, javascript price list calculator code, sample code javascript stroop test, javascript source code check internet speed test, code need paste craigs list, need help need find website customize pictureplease help, help need job, help need quick simple website, help need work designer illustrator, code smarty javascript, help need design creative brochure

About the Employer:
( 14 reviews ) IBADAN, Nigeria

Project ID: #13286575

Awarded to:


Hey, I can write this for you in 10 minutes with no issues. Let me know if you want this to be done today. Cheers, Andrew

$17 AUD in 1 day
(6 Reviews)

7 freelancers are bidding on average $29 for this job


Dear Sir. I had read your descriptions about project. Kindly give me a chance, i would like to discuss more about project and sure everything clear. Please drop me messages when you have free time. Any your queries and More

$45 AUD in 1 day
(117 Reviews)

Hi I can help you I can start right now I have good experience with javascript and of course i can do it

$24 AUD in 1 day
(41 Reviews)

Dear Sir, I’m interested in your project. I am Viet Anh, I'm a talented web developer and web designer with over than 5 years of experience in different directions web designing and web programming. I really interes More

$15 AUD in 1 day
(17 Reviews)

Hi, Nice to meet you, I am a senior software engineering with more 10 years experience in .NET, ASP.NET MVC, C#, SQL Server, HTML, CSS, Bootstrap, JQuery and JavaScript... After i read your requirements i feel that i More

$30 AUD in 3 days
(3 Reviews)

Hello Greetings from Sweety, Thanks for give us a chance for submit proposal. We have done 270+ project on upwork but on freelance not have profile strong till yet but we complete large amount of project in wordpress, More

$55 AUD in 1 day
(1 Review)

Hi, I hope you are doing well. I think i am a perfect candidate for this work. I have a good knowledge of HTML5, CSS3, JS, Jquery. Thanks, Rahul

$20 AUD in 1 day
(3 Reviews)