| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
|
|
#23 (permalink) |
|
Registered User
Join Date: May 2008
Location: Montreal, Quebec
Posts: 36
|
I don't know too much about Javascript, but can't you just have a variable that memorize in which section you are (0,1,2,3,...) and when you click up, Javascript scroll to the previous section, and then change the variable. For example (this isn't real code, just an idea) Code:
If you could "translate" that to Javascript, in combination with what was posted previously, I guess you have what you're looking for. |
|
|
|
#25 (permalink) |
|
Senior Member
|
I know how much of a pain this can be :P Making the fixed nav scroll to an anchor link is simple. 100's of options for that. Getting to move 1 section at a time based on the current section is definitely more difficult. Here is another example: Crush + Lovely They use both methods that people are talking about. Anchor scrolling (with the side nav) - but also next section scrolling if you use the keyboard. Take a look at their code, may be helpful. I would also take a look at serial scroll again. I've used it before to scroll based on a pixel value. (-+ XX which I know you would want to avoid) But I believe its possible to scroll to the next element with a specific class name. |
|
|
|
#26 (permalink) | |
|
Registered User
Join Date: May 2008
Location: Montreal, Quebec
Posts: 36
|
Quote:
But I just thought that if the person scrolls with scroll bars, you'd need to know in which section he now is, so you'd need to have some code to find where the user currently is. |
|
|
|
|
#28 (permalink) |
|
Design Student
Join Date: Apr 2008
Location: Brisbane, Australia
Posts: 2,255
|
Let me google that for you hiddenloop's paging_keys_js at master - GitHub Says it uses jQuery - dunno if you can add scrolling though. |
|
|
|
#29 (permalink) |
|
Oooeer missus!
Join Date: Oct 2008
Location: Nearer the gutter than the stars
Posts: 109
|
Did you get this sorted Bazzle? I added a smooth scroll to a page this morning using MooTools and it should only take a couple of minutes to adapt it to what you need. Linky - click the 'apply for this job' link. Let me know if it's the right kind of effect. |
|
|
|
#30 (permalink) | |
|
Don't touch my tea!
|
Quote:
Cheers mate, that's exactly what I want. Not really that bothered about smooth scrolling, although it would be nice. |
|
|
|
|
#31 (permalink) | |
|
Don't touch my tea!
|
Quote:
Can't see such a link mate. |
|
|
|
|
#32 (permalink) |
|
Oooeer missus!
Join Date: Oct 2008
Location: Nearer the gutter than the stars
Posts: 109
|
This should do what you want but it's not been tested. If you want to try it, you'll need MooTools Core and also a download of MooTools More with Fx.Scroll included. You could use Core only and switch Fx.Scroll to scrollTo. You'll need to add #up and #down ids to the 2 arrow buttons. Code:
|
|
![]() |
|