Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Joe Bruno
35,909 PointsjQuery Scroll Spy
I am trying to create a fixed nav that displays the section titles within a div with a set height (300px) and overflow-y: scroll. I have this fiddle that will work if a height is not specified. How can I make it work with a set height and overflow?
5 Answers
Alan Johnson
7,625 PointsJust checked out the fiddle. What element are you trying to put a fixed height on?
Joe Bruno
35,909 PointsI would like .wrapper to have a fixed height.
Alan Johnson
7,625 PointsIt looks like the issue is around you watching for events when the window scrolls, rather than when .wrapper scrolls. Check out out http://jsfiddle.net/rKvyn/. It's not perfect, but it's changing as the wrapper scrolls.
Alan Johnson
7,625 PointsDerp, I meant to say check out http://jsfiddle.net/uAeVZ/. Sorry about that, Joe Bruno!
Joe Bruno
35,909 PointsLooks good. I could have sworn I tried that fix! Thanks so much for you help with all my questions!