Results 1 to 1 of 1
Mar 13, 2011, 07:56 #1
- Join Date
- Jan 2010
- 0 Post(s)
- 0 Thread(s)
Jquery menu with seperate bg images
I am fairly new to jquery and would like som direction on how to complete this menu. I have a list which has 6 bg images which have on and active state images. these are are currenly changing when you hover using the a:hover css.
my question is i have a fairly large page and as you scroll down the menu follows the top of the screen but what i would like to happen is when the menu reaches a certain point on the page the menu item that it corrosponds to becomes active (changes to the on state bg image).
i have an idea that as you scroll down the page and you get to a certain position on the page you would remove the classes for all of them. use the selecter to select my id and add a special class with that specific bg image on it.
the only part i am struggling with is how would i determin how far down the page i am i know theres a function called .position() and you can use position.top. but not sure how i can use that to help me.
if you could point me in the direction or just a hint that would be really helpful.
thanks in advance