Click here to Skip to main content
15,905,914 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends any one help me ...


In single page design(home, AboutUs) contactus, .....) when i will scoll automatically menu hove also change using jquery
Posted
Comments
Kornfeld Eliyahu Peter 26-Oct-14 8:05am    
Have you done anything so far? Show some effort (code or search)! As is it ain't a question...

1 solution

For your query, please look into the below jsFiddle for this.
Fiddle for this referenced from stack overflow[^]
The below method is in different context but can help for a single page application if without scrolling one wants to navigate.
You can use as is used in most of the articles in code project, when the contents are provided and you move to the heading immediately.
The process is just the play with html and identifiers.
Suppose in a single page you have HOME, ABOUT, CONTACT US links and all three contents are there on the same page oviously with the heading as Home, About & Contact Us. So, you can provide id to each like below:-
HTML
<h2 id="homeId">Home</h2>
// Content goes here..
<h2 id="aboutId">About</h2>
// Content goes here..
<h2 id="contactUsId">Contact Us</h2>
// Content goes here..


Similarly the place/menu where the link/href would be there for the Home, About & Contact Us, use the href="#id" like below:
HTML
<a href="#homeId">Home</a>
<a href="#aboutId">About</a>
<a href="#contactUsId">Contact Us</a>

This will take straight to the content on click of the menu on a single page.
Hope This helps.
Post back your queries if I anticipated your query to be wrong.
Thanks.
:)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900