?
Solved

How to save the state of the webpage in jquery?

Posted on 2010-01-08
4
Medium Priority
?
359 Views
Last Modified: 2012-05-08
Basically I want to be a able to save the state of my webpage. foe example when I go to my webpage and then I go to the about page and I hit the refresh button it stays on the about page and doesn't go back to the home page. I am using jquery to go to each page or technically its just another section on that page.
Here is a link: http://www.acelogisticsllc.com/vCard-gallery-maps/
I have also added the files.

Thanks,
Tony

main.js
index.html
main.css
0
Comment
Question by:askurat1
  • 2
4 Comments
 
LVL 11

Expert Comment

by:level9wizard
ID: 26212535
You could just have your js set a cookie on each click, and when the document loads, check to see if the cookie is set, retrieve the value, and use that to switch the menu.
0
 
LVL 8

Author Comment

by:askurat1
ID: 26212551
Do you maybe have an example of this? This was also what I was thinking but not quite sure how to implement it.

Thanks,
Tony
0
 
LVL 2

Accepted Solution

by:
HaloWebProjects earned 2000 total points
ID: 26279096
thats because you are not using hash as the parameter in scrollTo plugin

jQuery.localScroll({
            target: '#content', // could be a selector or a jQuery object too.
            queue:true,
            duration:1000,
            hash: false,
            easing: 'easeOutExpo',
            onAfter: trigger
      });


change hash: true

this way it will work when you click refresh later, since you have the code for that already to handle hashed link call
0
 
LVL 8

Author Closing Comment

by:askurat1
ID: 31674687
Thank you! That works perfect.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question